- Linux Training
- Desktop Tutorials
- Server Tutorials
|Managing Users in LTSP|
|Server Training - Linux Terminal Server|
When you have a large number of users on a server it is important that you manage both the number of processes that they can use and the amount of space that they can consume.
@students hard nproc 45
This will allow students to open multiple programs but still be restricted from running 50copies of OpenOffice.
@students maxlogins 1
You can create other groups and also make different settings for individuals by placing the user name to start the line:
Limiting Disk Space with Quotas
You must place limits on disk space or users will consume all tha tis available. If your /home directory is a part of the / partition you may see your server crash when they fill it up.
Setup User Quotas
The edquota command is what you will use to edit a users quota. This command actually edits the aquota.user file if you are editing for users and the aquota.group file if you will be setting limits on groups.
edquota -u fred
This command will open up fredś quota file which has seven columns. The top of the file will list the userś name and UID.
The first column will list the directory file system. This is usually in the format of the partition that the quotas are on. An example:
The second column lists the number of blocks that are currently used by the user. These are 1KB blocks. An example:
This is almost 4.5 GB.
The next two columns represent the soft and hard limits for the users. 0 means that the user has no limits. 4000000 in the soft limit means that when the user reaches 4 GB they will activate a message that they are in violation of their quota. The grace period set in days gives this user the opportunity to make changes to move under the soft limit. Once the grace period is over, the user will be forced to make the necessary changes.
The hard limit represents a boundary that the user will not be able to cross. Administrators do not need to set hard limits unless the grace period is used. If an administrator does not use the grace period the result will be that the soft limit will be the boundary for users.
Typically, users appreciate a reasonable boundary with a warning system so that in the middle of an important project they are not forced with deleting data before they can save. Of course there are always the users that will push it to the limit.
1. Add a User
2. Edit /etc/fstab to enable user quotas
This example shows a separate /home directory has been created. If you only have one partition / then you will have to place the quotas on that partition. You must place quotas on partitions not directories.
# vi /etc/fstab
/dev/VolGroup00/LogVol00 /home ext3 usrquota 1 1
Save the change and then remount the /home directory.
Setup group Quotas
The edquota command may also be used to create group limits on space used. The -g option will provide this feature.
edquota -g sales
The first thing to do is to make sure the group has been created. In the example, office group is used to create a limit for the whole of office users. Note this is a SCSI drive in the example not a IDE drive.
Any time you edit the /etc/fstab you should have a backup in case you make a mistake...you have been warned!
Disk quotas for group sales (gid 509):
Filesystem blocks soft hard inodes soft hard /dev/sdc1 34000 35000 40000 234 0 0
The quotacheck command must be run on a regular basis to maintain the quotas that have been set.
Copyright CyberMontana Inc. and BeginLinux.com
All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874