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

link|improve this question

67% accept rate
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
feedback

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

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

up vote 1 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.

link|improve this answer
feedback

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