Friday, July 10, 2009

USER QUOTA

Quota is used to retrick the user for the space limit and number of file limits

quota has 2 limit
> soft limit (show warning only )
> hard limit (retrick the last limit)

Step to creating quota

> first create The partition using
# fdisk /dev/sda
>then
#partprobe /dev/sda
> then format
#mkfs.ext3 /dev/sda5
> then create entery in fstab
#vim /etc/fstab
example :- /dev/sda5 /home ext3 defaults.usrquota 0 0
#mount -a
>refresh or restart the system
#mount -o remount /home
#ll /home
>then create database file
#quotacheck /home
>database file is "aquota user"
> then make active the file aquota use command
#quotaon -v /home
>then add user
#useradd username
#passwd -------
#ll /home
>then edit and gave the limits to user open file then add limits
#edquota username
> don't change intial reading
blocks = size
inodes= number of file limits
then give soft and hard limits
save and exit
and logout
#logout

then login to user and check limits and its work or not
#repquota -av
#quota

Remove quota
>first delet user
#userdel
#umount /home
>remove entery to fstab
#vim /etc/fstab
#mount -a
>then delet partition
#fdisk /dev/sda

No comments:

Post a Comment