Make the user can create the file less then 70K.

CORRECT TEXT
neo user tried by:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
files created successfully. Again neo tried to create file having 70K using following command:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
But he is unable to create the file. Make the user can create the file less then 70K.

CORRECT TEXT
neo user tried by:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
files created successfully. Again neo tried to create file having 70K using following command:
dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70
But he is unable to create the file. Make the user can create the file less then 70K.

Answer:

Explanation:
Very Tricky question from redhat. Actually question is giving scenario to you to implement quota to
neo user. You should apply the quota to neo user on /home that neo user shouldn’t occupied
space more than 70K.
1. vi /etc/fstab
LABEL=/home /home ext3 defaults,usrquota 0 0 à To enable the quota on filesystem you should
mount the filesystem with usrquota for user quota and grpquota for group quota.
2. touch /home/aquota.user àCreating blank quota database file.
3. mount -o remount /home à Remounting the /home with updated mount options. You can verify
that /home is mounted with usrquota options or not using mount command.
4. quotacheck -u /home à Initialization the quota on /home
5. edquota -u neo /home à Quota Policy editor
See the snapshot
1 Disk quotas for user neo (uid 500):
2 Filesystem blocks soft hard inodes soft hard
4 /dev/mapper/vo-myvol 2 30 70 1 0 0
Can you set the hard limit 70 and soft limit as you think like 30.
Verify using the repquota /home command.



Leave a Reply 0

Your email address will not be published. Required fields are marked *