--
Jay R. Wren
===============================================
Nothing in the "edquota" reference page implies that it doesn't
expect to be interactive, but I suspect that if you made your
editor be "cat" and used the "apply a prototype allocation to
the named user" variation, you could write a script to run it
all for you. I'd try it on a few test cases first.
Tom
===============================================
If your usernames are in a file called "usernames", you can:
#ksh
#cat usernames |while read newuser; do /usr/sbin/edquota -p prueba
$newuser;done
So the quota of "prueba" user (a user you had created before and
has quota) is copied to all the users you have in your file "usernames".
Jo
===============================================
Not exactly what you want, but I've done something similar... On our
system, any given user's quota is dependent upon what group they're in.
So I created a prototype user for each group; dummy IDs with no real
login. Once the prototypes are set up, it's relatively easy to change a
bunch of users or create new users using the prototype:
vedquota -p prototype -u user
This does not pop you into an editor to change values, it just makes
everything the same as the prototype user! Put that in a script loop, and
you can do your entire userbase in a relatively short time!
Pablo
Received on Wed Oct 02 2002 - 18:39:15 NZST
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:43 NZDT