LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   quota on RH 7.3 (https://www.linuxquestions.org/questions/linux-newbie-8/quota-on-rh-7-3-a-28011/)

keevitaja 08-15-2002 06:24 PM

quota on RH 7.3
 
i did search the forum and did like the howto's said, but i can't get this user quota to work... do i have to do it otherwise in my dist?

neo77777 08-15-2002 11:12 PM

What kind of problem are you experiencing with quota?

keevitaja 08-16-2002 08:41 AM

dunno if i can call it s a problem. i think it is more like a lack of knowledge. if you would describe me how to make quota work on RH 7.3 i could say if there is a problem.

neo77777 08-16-2002 10:43 AM

If quota is not starting on boot up include these lines in your /etc/rc.d/rc.local
Code:

#Check quota and then turn quota on
if [-x /usr/sbin/quotacheck]
  then
          echo "Checking quotas. It might take some time ..."
          /usr/sbin/quotacheck -avug
          echo "DONE"
fi
  if [-x /usr/sbin/quotaon ]
      then
              echo "Turning on quota."
              /usr/sbin/quotaon -avug
  fi

Now there is another substep - configuration of individual partitions. For each partition on which you want quota, you'll need to setup three things: usrquota option, grpquota option and the quota database. It is simple just edit your /etc/fstab file to include usrquota or grpquota options on the respective partitions:
/dev/hdb1 /home ext3 defaults, usrquota 1 1
or for groups
/dev/hdb1 /home ext3 defaults, grpquota 1 1

Now the quota database: at the root of quota'd partition you need quota.user abd quota.group files which are readable by root only, so for /home
cd /home
touch quota.user
touch quota.group
chmod 600 quota.user
chmod quota.group

now you are redy to configure individual quotas
Note: the first time you turn the quota the quotaon command will report that quota.user and quota.group file have invalid arguments, it is ok, it will reappear untill you add at least one user to each database via edquota command
for instance if you run
edquota -u user_name
it will bring up an editor for quota to configure quota for user with user_name (hint the editor corresponds to env variable set on your system it is called ... EDITOR, so prior this step run
EDITOR=your_preffered_command_line_editor; export EDITOR
)
so I guess for everything else there is man page and internet resources.

keevitaja 08-16-2002 12:27 PM

there's the thing! i can't make
/dev/hda3 /home ext3 defaults, usrquota 1 1
after reboot it says, that there is some bad line in /etc/fstab... and there is no /home/quota.user to chmod.

neo77777 08-17-2002 09:53 AM

What happens when you add users to qouta.user and quota.group ?


All times are GMT -5. The time now is 05:51 PM.