Bash shell
I noticed when I created a user with this command below, the user gets a "-bash-4.1$" when he logs in.
useradd -g Grp1 -d /home/locaton1 person1 If I tried the command below, it gets a"[johndole@localhost~]$ adduser johndole I am guessing the command force the user to be in the bash shell? |
Both users are using the bash shell. The useradd command will not check the specified /home-directory for existence and will not create it if it doesn't exist, if you don't use the -m option. As a consequence, the files from the skeleton directory (usually /etc/skel) will not be copied to the new users /home directory. In your case the skeleton directory seems to contain a bashrc file that sets the different shell-prompt.
In opposite, the adduser command does all these things by default. |
Quote:
Thanks. I did --> echo $SHELL, it resulted same. Just needs a good explanation. |
Both users are there, and both users are using the bash shell. A TobiSGD said, the /etc/skel can sometimes do strange things.
|
Quote:
adduser -g grp1 -d /home/location1 person5 adduser: warning: the home directory already exists. Not copying any file from skel directory into it. useradd -g grp1 -d /home/location1 person6 useradd: warning: the home directory already exists. Not copying any file from skel directory into it. |
There's a good discussion of adduser vs useradd here http://www.garron.me/go2linux/userad...ntu-linux.html.
In short, the 'real' cmd is useradd, but some distros may have adduser as a symlink to this OR it may be a separate (Perl) script or it may not exist... ;) HTH :) |
All times are GMT -5. The time now is 11:34 PM. |