1

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

puk
  • 285
  • 1
  • 6
  • 18

1 Answers1

2

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.

sbocinec
  • 68
  • 5