HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_223
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 223 After, the procedure is the same as for assigning quota for a particular user as describe above you must modify the parameter of “soft =” and save your change. Assigning quota for groups of users with the same value The edquota program has a special option (-p) that assign quota for groups of users with the same value assigning to an initial user. Assuming that you want to assign users starting at UID's 500 on the system the same value as the user “wahib”, we would first edit and set wahib's quota information, then execute: · To assign quota for group of users with the same value, use the following command: [root@deep /]# edquota -p wahib `awk -F: '$3 > 499 {print $1}' /etc/passwd` The edquota program will duplicate the quota that we have set for the user “wahib” to all users in the “/etc/passwd” file that begin at the UID 499. Further documentation For more details, there are several man pages you can read: $ man edquota (8)            - edit user quotas  $ man quota (1)              - display disk usage and limits  $ man quotacheck (8)         - scan a file system for disk usages  $ man quotactl (2)           - manipulate disk quotas  $ man quotaon, quotaoff (8)   - turn file system quotas on and off $ man repquota (8)           - summarize quotas for a file system  $ man rquota (3)             - implement quotas on remote machines  Commands The commands listed bellows are some that we use often in our regular use but much more exist and you must check the man page for more details and information. Quota Quota displays users' disk usage and limits on a file system. · To display user disk usage and limits, use the command: [root@deep /]# quota -u wahib Disk quotas for user wahib (uid 501):      Filesystem  blocks   quota   limit   grace   files   quota   limit   grace       /dev/sda6    6001*   6000       0    none       7       0       0  · To display group quotas for the group of which the user is a member, use the command: [root@deep /]# quota -g wahib Disk quotas for group wahib (gid 501):      Filesystem  blocks   quota   limit   grace   files   quota   limit   grace       /dev/sda6    5995*   5000       0    none       1       0       0  NOTE: If the group quota is not set for the user specified, you will receive the following message: Disk quotas for group wahib (gid 501): none Repquota   Repquota produces summarized quota information of the disc usage and quotas for the specified file systems also, it print for each user the current number of files and amount of space (in kilobytes).