Does QUOTA work for users not in /etc/password (ie. by UID?)

Dan Nelson dnelson at allantgroup.com
Tue Aug 29 06:08:59 UTC 2006


In the last episode (Aug 29), Philip Hallstrom said:
> I was looking at implementing QUOTA for a server, but all of our
> users are stored in a database (ftp/pop/imap authenticates against
> the db).  They each have their own uid's though so the files are
> owned "individually".
> 
> I would think file system quotas would work for this, but from the
> docs I've read so far it doesn't say and all the various commands
> take a username as an argument, not a uid...
> 
> So without actually trying it out, anyone know if quotas will work
> without matching /etc/passwd entries?

Quotas work entirely by uid: the quota info is stored at an offset of
uid*sizeof(struct dqblk) in quota.user.  You can pass uids to edquota
or any other quota tool.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list