LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-06-2006, 03:14 AM   #1
kniwor
Member
 
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106

Rep: Reputation: 15
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....
 
Old 07-06-2006, 11:37 AM   #2
kniwor
Member
 
Registered: Aug 2005
Distribution: Slackware 12
Posts: 106

Original Poster
Rep: Reputation: 15
should i have posted elsewhere
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set quota at /home davidhk Linux - General 2 06-04-2005 10:10 PM
Quota:cannot be set and update swmok Linux - Software 1 10-22-2003 07:30 PM
how to set quota awp Slackware 1 04-27-2003 12:58 PM
set user quota size juno Linux - General 2 10-25-2002 03:42 AM
how to set quota, a/c and permission gogo Linux - General 1 10-09-2001 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration