Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Aug 1999 23:42:44 -0500 (EST)
From:      Ben Vaughn <bvaughn@prophetnetworks.net>
To:        Evren Yurtesen <yurtesen@ispro.net.tr>
Cc:        "James F. Ruffer III" <freebsd@empireone.net>, freebsd-isp@FreeBSD.ORG
Subject:   setquota.c (Re: adduser)
Message-ID:  <Pine.BSF.4.10.9908312341100.45567-200000@shell01.prophetnetworks.net>
In-Reply-To: <37CCAC11.7D11B2A2@ispro.net.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1278322869-936160964=:45567
Content-Type: TEXT/PLAIN; charset=US-ASCII

Ive attached the source to setquota.c, a nifty prog that my friend dave
kirchner wrote for freebsd because it needs it. Syntax is:

setquota username 1M 5M filesystem

with the numbers being variable and the M being optional.

On Wed, 1 Sep 1999, Evren Yurtesen wrote:

> well you can copy 1 users quota settings with the -p option and
> you can say to the edquota that copy this settings to the UIDs between
> 1000-5000 this is working I have tried :)
> 
> when you use adduser script it is giving the next available UID so
> you wont have trouble if that UID is one of the UIDs between 1000-5000
> 
> 
> "James F. Ruffer III" wrote:
> 
> > basically i was using
> > edquota -p Quota username
> > this wil set it to a standard 20 mb soft 30 mb hard
> > im looking to set everyone at a 50 soft 60 hard
> > auto while adduser is running
> > i was being lazy by seeing if some one had a script already but i gues iill
> > have to code one
> > thankyou guys+dolls
> > ----- Original Message -----
> > From: Evren Yurtesen <yurtesen@ispro.net.tr>
> > To: James F. Ruffer III <freebsd@empireone.net>; <freebsd-isp@FreeBSD.ORG>
> > Sent: Tuesday, August 31, 1999 12:56 PM
> > Subject: Re: adduser
> >
> > > why do not you put a line to adduser script something like
> > > edquota -p 100  $UID
> > > well I am not sure what is the variable for UID in adduser script
> > > though,
> > > this would copy the quota settings of the account with uid 100 to the
> > > new account
> > > created...I believe this works even when you do not have an account with
> > > the
> > > $UID because I did something like edquota -p 100 1000-10000
> > > and now all the users have the same quotas automatically when I add them
> > >
> > > is this what you want to do?
> > >
> > > Evren
> > >
> > > "James F. Ruffer III" wrote:
> > >
> > > > hmm does anyone have a great adduser program that wil set repquota
> > > > while adding the user
> > > >
> > > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > > with "unsubscribe freebsd-isp" in the body of the message
> > >
> > >
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message
> 

--0-1278322869-936160964=:45567
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="setquota.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.4.10.9908312342440.45567@shell01.prophetnetworks.net>
Content-Description: setquota
Content-Disposition: attachment; filename="setquota.c"

LyogKGMpIGRwayAqLw0KDQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5j
bHVkZSA8dWZzL3Vmcy9xdW90YS5oPg0KI2luY2x1ZGUgPHB3ZC5oPg0KDQpp
bnQNCm1haW4gKGludCBhcmdjLCBjaGFyICphcmd2W10pIHsNCglzdHJ1Y3QJ
cGFzc3dkCSpwdzsNCg0KCWludAl1aWQ7DQoJaW50CXNvZnRibG9ja3MgPSAw
Ow0KCWludAloYXJkYmxvY2tzID0gMDsNCg0KCWNoYXIJKm1udHBvaW50Ow0K
CWNoYXIJKnNvZnRxdW90YTsNCgljaGFyCSpoYXJkcXVvdGE7DQoNCglzdHJ1
Y3QgZHFibGsgKmJsb2NrX2M7DQoJY2hhciAqYmxvY2sgPSAoY2hhciAqKWJs
b2NrX2M7DQoNCglpZiAoYXJnYyAhPSA1KSB7DQoJCXByaW50ZiAoInVzYWdl
OiAlcyB1c2VybmFtZSBzb2Z0cXVvdGEgaGFyZHF1b3RhIG1vdW50cG9pbnRc
biIsIGFyZ3ZbMF0pOw0KCQlyZXR1cm4gKDEpOw0KCX0NCg0KCXB3ID0gZ2V0
cHduYW0gKGFyZ3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mICgqcXVvdGEgPT0g
J20nIHx8ICpxdW90YSA9PSAnTScpIHsNCgkJCWJsb2NrcyAqPSAxMDI0Ow0K
CQkJZG9uZSA9IDE7IC8qIGR1bXAgdGhlIGNoYXJzIGFmdGVyICdtJyAqLw0K
CQl9DQoJCXF1b3RhKys7DQoJfQ0KCWJsb2NrcyAqPSAyOw0KCXJldHVybiAo
YmxvY2tzKTsNCn0NCg==
--0-1278322869-936160964=:45567--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9908312341100.45567-200000>