Quota being set automatically, adduser
ok, so yeaterday i enabled quota on my reiser, i got only one partition on this HDD, and a swap.
after enabling quota, i needed to set quota automatically for users when i create them, so i took backup of the adduser binary in /usr/sbin, and edited it to add these lines at the bottom,
setquota -u "$LOGIN" 100000 105000 0 0 -a /
echo
echo
repquota / | grep used
repquota / | grep "$LOGIN"
echo
echo
echo "Quota Set for "$LOGIN" "
echo "Account setup complete."
echo
exit 0
i also edited the default home directory in the adduser command.
now i used this and it was woking great, it added users and set quota automatically as i wanted it to be.
then i decided to copy this into another binary, so i copied it into an another binary, custuseradd, and then restored the adduser command from it's backup.
now i can use the new command i created to make users and set quota, and it works great......
So far so good.
but when i use adduser, which is the default command, it also auomatically sets quota, i checked and reched the script, it is the default script.... other changes that i made in the script (like the home folder) are all restored to default, the script is default... but how come the quota is being set automatically.....
and useradd does not do anything wrong....
|