1833159 Members
3163 Online
110051 Solutions
New Discussion

Re: quota for all users

 
Mahesh Koli
New Member

quota for all users

Is there any easier way to set quota for all users ? I have 800 users and 10 different systems. I want to avoid using script using /etc/passwod input.
3 REPLIES 3
Stuart Browne
Honored Contributor

Re: quota for all users

You want quota's for individual users?

You can set a default user quota, as well as a default group quota, which can then be refined per user/group should the need be required.

The Quota-HOWTO on at http://www.tldp.org/HOWTO/Quota.html has all the details on this, and much much more.

(NOTE: Most modern distributions have quota support built into the kernel already).
One long-haired git at your service...
Mahesh Koli
New Member

Re: quota for all users

I want to add default quota to all users.
Edwin Buck
Occasional Advisor

Re: quota for all users

Default quotas are not implemented for users in the linux quota system.

This has to do with the quota being bound to the user id / group id. The authentication model determines these values, and linux can handle many different authentication models (see: pam, the pluggable authentication module). Finally, many authentication models have no concept of a "default" user or "default" values which are accessible from any users's login context.

Some extensions to quota have been proposed, including setting the quota for all possible uid's and gid's. That won't happen soon, since it is incredibly wasteful in disk space consider you would be settin quotas on the many thousands (or millions) of users who will never be created or used. Also setting quotas on all users is generally a bad idea on UNIX / LINUX systems where system services run as users instead of root (to enhance security).

Tracking down the mail user, database user, web user, ftp user, etc. and determining the appropriate amount of quota to set so email, oracle, apache, ftpd, etc. don't stop working quickly makes setting quotas on individual users seem a much better solution.

By the way, you don't need to use a password file to set quotas for all your users. Once you setup the "default" quota on user "bob" and you have a list of other users ("jane", "sally", and "jim") you wish to set identical quotas on, you can use the simple shell script:

#!/bin/sh
for USER in jane sally jim; do
edquota -p user1 "$USER"
done