FAQ : install : mailing list : contact

Userdir: the end of /etc/passwd?

Userdir is so far not much more than a proof-of-concept drop-in replacement for FreeBSD's getpwent.c, but I believe it has the potential to displace /etc/password (and its friends like /etc/master.passwd and vipw).

The idea behind it is simple: rather than have one flat root-owned file containing the entire user database, userdir takes advantage of the powerful hierarchical database that is the Unix filesystem. Each login name has its own directory, and each field in struct passwd is represented inside that directory by an appropriately named text file. For example, user "bob"'s shell is in /etc/users/bob/SHELL and his home directory is in /etc/users/bob/DIR. And you can find his UID in /etc/users/bob/UID. His crypted password is in /etc/users/bob/PASSWD, and since by default this file is mode 0400 and owned by root, there's no need for a separate "shadow" password file. Of course the system administrator is free to give "bob" (or bob's boss) read and/or write access to this file, paving the way for a (still vaporware) passwd utility that doesn't need its setuid bit set.

And that's just one of many things that are easy to do with userdir that are either difficult or not possible at all with a traditional /etc/passwd system.

How you can help

I welcome your questions, comments, and code: 1be9a9fe60ba36aa6c90a0f1ab373887@e856d72c510137116ed7414755217d8f.tmetic.com, but read the FAQ first, and consider joining the mailing list.


dren.ch