*BSD News Article 97247


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!su-news-feed4.bbnplanet.com!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!newsrelay.courtave.net!polo.iquest.com!vespucci.iquest.com!dougal
From: Dougal Campbell <dougal@vespucci.iquest.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Add User & Set Quota
Date: 6 Jun 1997 14:58:05 GMT
Organization: interQuest Online Services -- Huntsville, AL
Lines: 26
Distribution: world
Message-ID: <5n98ht$tfb$1@polo.iquest.com>
References: <01bc7256$23f76120$0b9195ce@default>
NNTP-Posting-Host: vespucci.iquest.com
X-Newsreader: TIN [UNIX 1.3 unoff BETA 970424; i386 FreeBSD 2.1.5-RELEASE]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42513

Smilepak <smilepak@vividnet.com> wrote:
> Question, 
> 	In freeBSD, I know how to set user and add user and such, but how to i set
> a quota limit for each user i added? I am doing a research before going
> into Shell account access give out, can anyone show me how and know of some
> good place where i can find information on seting up an ISP with bsd? thx,

Create a "template" account, and set its quota to whatever you want your standard
quota to be with the edquota command.

Then, modify the adduser script to do something like the following:

   system("edquota -p $template $userlogin");

NOTE: I use a highly customized (almost a rewrite) version of adduser,
tailored to my needs for various standard account types. So you'll need
to make sure your variable names match up.

The important thing is the use of the "-p" option to edquota, which
basically copies quota information from one account to another.

-- 
Dougal Campbell     | "If you ever get close to a human, or human behaviour
Systems Manager     |  You better be ready to get confused...." 
ADViCOM: Hsv, AL    |              -- "Human Behaviour", Bjork
dougal@advicom.net  | ADViCOM: Internet Solutions Provider www.advicom.net