From owner-freebsd-questions Wed Jun 20 5:20:57 2001 Delivered-To: freebsd-questions@freebsd.org Received: from malkav.snowmoon.com (malkav.snowmoon.com [209.23.60.62]) by hub.freebsd.org (Postfix) with SMTP id 8E70F37B401 for ; Wed, 20 Jun 2001 05:20:52 -0700 (PDT) (envelope-from jaime@snowmoon.com) Received: (qmail 17869 invoked from network); 19 Jun 2001 11:20:49 -0000 Received: from localhost.snowmoon.com (HELO localhost) (127.0.0.1) by localhost.snowmoon.com with SMTP; 19 Jun 2001 11:20:49 -0000 Date: Tue, 19 Jun 2001 07:20:49 -0400 (EDT) From: Jaime To: whisky Cc: questions@freebsd.org Subject: Re: Quotas Problem In-Reply-To: <002301c0f88f$e1fadda0$0100000a@whisky> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 19 Jun 2001, whisky wrote: > I setup group quotas via > # edquota -g groupinquestion > > and instead of setting the quota for every user in the group... This is what it is supposed to do. > # edquota -u username > and then the script edit the blocks/inodes (I suck at coding) If this is what you want, read the manual for edquota more closely. There is an option "-p" that will be useful to you. If you can do *any* coding, stick a call to this inside a look. For example, in perl: foreach (@users) { $cmd = "/usr/sbin/edquota -u -p $ARGV[1] $_"; system("$cmd"); print "."; } I found the following script lieing around in my utilities directory. I can't remember if it works or not, but feel free to try it. #!/usr/bin/perl # #The purpose of this script is to read a file full of usernames, #one username per line, and set all of their disk quotas to be #the same as that of one specific user. # if ((!($ARGV[0])) || (!($ARGV[1]))) { die "$0