Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Setting up disk quota on ubuntu for multiple users

When assigning user quotas, one has to use edquota. However, this brings up the vim editor. Is there any way to bypass this. Observe this pseudocode

for username in usernames
 adduser username
 #########Filesystem######blocks######soft######hard######inodes######soft######hard
 edquota  /dev/hda2        596          0         0         1          0         0

I want to create 100 users (with 1/100th of the hard disk space), and I don't want to edit 100 files in vi/vim. Can I pass the values as arguments like above, or at least use a template file as alluded to here

share|improve this question
    
Yes sorry, I realize that now –  puk Nov 4 '11 at 0:18
    
No need to be sorry, duplicates are normal and expected. –  Zoredache Nov 4 '11 at 0:21
add comment

marked as duplicate by Zoredache, quanta, Ward, Iain, mailq Nov 4 '11 at 11:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 2 down vote accepted

If all of the quotas are the same for all users you can set quota to one (prototypical) user and then use edquota -p <proto_user> <user> in for loop to duplicate the quotas of the prototypical user specified for each user specified.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.