pw -V user add/del cancels out -m/-r
Sean C. Farley
scf at FreeBSD.org
Wed Oct 22 01:23:33 UTC 2008
Recently, someone reported an issue to me with using -V along with -m or
-r when adding or deleting a user via pw, respectively. The user's home
directory is not being created nor deleted.
>From looking at the code, it appears that this is intended. I would
expect it to look in the new /etc directory for all needed files (i.e.,
skel) to create the directory, but this is prevented due to the _altdir
flag[1]. Would anyone know the full story behind this behavior when -V
is provided? Before I change this, I would like to know all the
consequences. It happened only over nine years ago; I am sure it is
fresh in everyone's memory. ;)
The only apparent issue I see is if the user added to the alternate /etc
files has the same UID and/or GID of an existing user in the base
system. If I change anything I think I should make -V apply to all /etc
files (i.e., opiekeys, skel). They can always be overridden if desired.
Sean
1. http://svn.freebsd.org/viewvc/base/head/usr.sbin/pw/pw_user.c?revision=44229&view=markup
--
scf at FreeBSD.org
More information about the freebsd-arch
mailing list