General discussion


cannot create home dir:

By zawmin20052003 · i've one pro:,I can't create user home directory when i add new user.i can issue command "useradd -d" but nothing was create in referred directory.and i've tried to issued "usermod -d" again.but same .and i used root id to create new user.
anybody knows it....? thanks alot.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Jaqui In reply to cannot create home dir:

well, if the utils aren't creating the dir, there is an error in thier config.
the simplest workaround:
md ~username
cp bashrc ~username
cp bash_profile ~username

cp from a user with same permission levels the new user is to have.

after that chown dir to ~username
then chown the files to that user also.

Collapse -

by Martin Simons In reply to cannot create home dir:

use "useradd -d <dir> -m"
or "usermod -d <dir> -m"

the "-m" option will tell useradd/usermod to
create the directory if it does not exist.
Otherwise the -d only adds/modifies the directory
reference in the user entry.

I am sorry, I don't mean to sound like an
a**hole, but this information is found in the
man pages "man useradd".

Related Discussions

Related Forums