[Sunhelp] Disk quota by group.

Leon Halford - Open Systems Solutions Ltd Leon.Halford at opensolutions.co.uk
Thu Jul 22 07:01:28 CDT 1999


Try the following..
> Date: Wed, 21 Jul 1999 14:09:27 -0500
> From: John Kennedy <jkennedy at orent.com>
> Subject: [Sunhelp] Disk quota by group.
> 
> I am looking for a script or app that will allow me to set disk quotas
> by group instead of by user.  

Try something like the following.. it all comes down to using the (edquota -p 
command though). I'm assuming use of /etc/passwd, swap for ypcat passwd if using 
NIS.

GROUPNAME="lp"
groups `cat /etc/passwd | awk '{FS=":";print $1}'` | grep " $GROUPNAME" | awk 
'{print $1}' | xargs edquota -p template_user 

Where template_user is a quota profile previously defined for a typical user of 
the group.

For more information, man edquota (-p option)

Leon Halford.








More information about the SunHELP mailing list