Discussion Locked

cannot create home dir:

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi...now 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.

2 replies

by jaqui

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.

by martin simons

use "useradd -d
-m"
or "usermod -d
-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".

This discussion is closed to new replies.