On Mon, 22 Jun 1998, Dave Hitz wrote:
Is there *any* way (and I'm open to any suggestions) to get around the inability of 'quota resize' to handle additions/deletions from the /etc/quotas file ?
Here's something that *should* work, but I haven't actually tried it.
(1) Create a default quota on the FS in question. (2) Create a home directory for your new user -- jsmith.
(There should now be a default quota for jsmith.)
(3) Add a new entry in /etc/quotas for jsmith. (4) Run 'quota resize'.
The reason this should work is that quota resize does not rescan the filesystem to build new quotas from scratch, but it should hijack (and update) an existing quota, whether that quota came from a default or from a specific user quota.
Note that you must create jsmith's directory before you add jsmith to /etc/quotas and run 'quota resize'. Otherwise, there won't already be a default-created entry for jsmith, and quota resize won't find any existing quota to attach the new jsmith quota to.
I forgot to write back about this, but just to confirm: this works perfectly. The only problem is the user whose quota is set before any files on the quota tree are owned by their UID. This is easy enough to solve if your user account creation software creates the userdirectory before it issues the quota resize.