LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-29-2004, 01:07 AM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Rep: Reputation: 30
Update user quota limit

we have 350 users in the system , now I want to set the size quota limit for all users , each user will allow 5M hard and 10M soft quota limit , I know it can update by the command "edquota" , could suggest what is the convenience way to update all users except run 350 times of edquota ? thx .
Old 12-29-2004, 01:19 AM   #2
Registered: Aug 2004
Location: /dev/null
Distribution: Slack 10, Debian
Posts: 99

Rep: Reputation: 15
I don't know of a command to do that, so my suggestion would be a quick and dirty script. It might be easiest to write an awk script that grabs /etc/passwd and strips the first parameter. You could even just copy passwd, delete the lines that have things like root, ftp, etc, then run the script on the resulting file.

Something like

cat /etc/passwd | awk -F ':' '{print $1}' | xargs YOURQUOTACOMMANDHERE

should work perfect on a passwd file that had users you didn't want to quota removed.

Last edited by realjustin; 12-29-2004 at 01:21 AM.
Old 12-29-2004, 02:10 AM   #3
LQ Newbie
Registered: Nov 2004
Location: Bangalore
Distribution: Redhat,Fedora
Posts: 8

Rep: Reputation: 0

It will be better to create the quota for one user(say user1) and duplicate (use it as a prototype) this for others.this can be done by

edquota -p user1 user2..........

or u can create a group and set quota for that.
Old 12-29-2004, 03:23 AM   #4
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,129

Original Poster
Rep: Reputation: 30
thx reply ,

I hv generated a file called /tmp/users
#vi /tmp/users

then run the script

for i in 'cat /tmp/users'
edquota $i

but it report the error :

edquota: User cat doesn't exist.

could suggest what is wrong , thx in advance.
Old 01-21-2005, 05:13 PM   #5
LQ Newbie
Registered: Jan 2005
Location: NL
Posts: 1

Rep: Reputation: 0


for i in 'cat /tmp/users'


for i in `cat /tmp/users`

I think that will help you.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ftp quota probs - 0kb files at quota limit ph_xm Linux - Newbie 0 02-02-2005 12:13 PM
User quota limit ust Linux - General 1 12-16-2004 07:55 AM
Where can I find a simple tutorial on quota (limit capacity of disk space of a user)? George2 Linux - Software 5 11-04-2003 09:56 AM
Quota issue, hard limit doesn't limit users Gratz Linux - Software 2 09-16-2003 08:35 AM
Limit Disk Quota per user ? mikeshn Linux - General 1 06-19-2003 07:33 PM

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

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