passwd & permissions

David Malone dwmalone at maths.tcd.ie
Sun Mar 20 12:04:00 PST 2005


On Sun, Mar 20, 2005 at 01:26:57PM -0600, H. S. wrote:
> I'm using FreeBSD on various servers for many time now, and there is
> something that always bothered me. It is related to /etc/passwd and
> /etc/pwd.db permissions.
> 
> I have custom (0640) permissions on these files. However, each time a user
> changes his/her password, the system will reset the password file
> permissions back to the original (rw r r).

I think these files would be rebuilt by the pwd_mkdb utility. You
should be able to change it to rebuild the files with different
permissions. See the PERM_INSECURE and PERM_SECURE constant pwd_mkdb.c.

(I'm not really sure about the wisdom of making passwd and pwd.db
have permissions 640, but I guess you know your system best.)

	David.


More information about the freebsd-hackers mailing list