HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_221
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 221 Step 2 Now we must initialize the files “quota.user” and quota.group” on our root directory of the file system in order to not receive an errors messages about quota during the reboot time of our server. · To initialize “quota.user” and/or “quota.group” files, use the following commands: [root@deep /]# edquota -u wahib [root@deep /]# edquota -g wahib The steps above are necessary just to initializing the files “quota.user” and/or “quota.group”, the command edquota (-u) will edit the quota for the user “wahib” and (-g) will edit the quota for  the group wahib. Note that you must edit an existing UID/GID on your system to initialize the files. Step 3 After you have finished to set the appropriated options for your quota program in the “/etc/fstab” file, created and initialized the “quota.users”, and/or “quota.group” files, you must reboot the system for the changes you have made in the “/etc/fstab” file and/or the files “quota.user, quota.group” to take effects. · To reboot your system, use the following command: [root@deep /]# reboot   Assigning Quota for Users and Groups After your system has been rebooted, you can now assign quota to users or groups of users in your system. This operation is performed with the “edquota” command. edquota (8). The edquota program The edquota program is a quota  editor that create a temporary file of the current disk quotas used by the super-user “root” to set quota for users or group of users in the system. The example bellow shows you how to setup quota for users or groups in your system. Assigning quota for a particular user If for example, you have a user with the login id “wahib” on your system. The following command takes you into the editor (vi) to edit and set quota for user “wahib” on each partition that has quota enabled: Step 1 · To edit and modify quota for user “wahib”, use the following command: [root@deep /]# edquota -u wahib Quotas for user wahib: /dev/sda6: blocks in use: 6, limits (soft = 0, hard = 0)         inodes in use: 5, limits (soft = 0, hard = 0) After the execution of the above command, you will see the following lines related to the user “wahib” appearing on the screen. The "blocks in use:" display the total number of blocks (in kilobytes) a user has consumed on a partition. The "inodes in use:" display the total number of files a user has on a partition. These parameters “blocks in use, and inodes in use” are controlled and set automatically by the system and you don’t need to set or change them. Step 2