NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: stupid problem with useradd (Shadi Abou-Zahra) writes:

>"useradd -m username" goes into recursive creation of home directories 
>like "/home/username/username/username ..." (NetBSD 5.0.1).

If you specify a -d homedir then useradd executes

        mkdir -p homedir

otherwise it executes

        mkdir -p basedir/username

where basedir is either specified with -b basedir (or base_dir basedir
in /etc/usermgmt.conf) or the literal string /home. None of this can
generate recursive directories.

The directory is then filled recursively with the content from a
skeleton directory specified with skel_dir in /etc/usermgmt.conf
or /etc/skel by default.

If the skeleton directory is the same as /home, either by specifying
skel_dir in /etc/usermgmt.conf or by some weird use of filesystem links,
you may get the observed behaviour.

                                Michael van Elst
                                "A potential Snark may lurk in every tree."

Home | Main Index | Thread Index | Old Index