Mint /bash or /sh

Vensty

New Member
Credits
0
Hi Guys
Brand new to Linux and I have my first question.
Been going through some learning and have used the 'useradd' command to add a user.
Having set a password also, I logged out of Mint to login as the new user. Didn't work, just returned me to the login screen. Checked password and ran a couple more times.
Since noticed that in Terminal useradd sets the users home dir as /bin/sh. In Mint users home dir goes to /bin/bash. 'bash' works and allows me to login as the new user.
I note that 'adduser' creates home dir in /bin/bash. (same as in Mint)
What is the difference, should I not use 'useradd'?
Thanks
 


Rob

Administrator
Staff member
Credits
80
Hey there - welcome to the forum!

Either really should work, but if you want to test some things, feel free to edit the /etc/passwd file and replace '/bin/sh' with '/bin/bash' for the user in question.

I'm wondering if you had a typo in the password for the user.. you can fix this by typing (as root):
Code:
passwd username
(replace username with the username of the user)
and following the prompts.

Good luck - let us know how it worked out.

Rob
 

Vensty

New Member
Credits
0
Hey there - welcome to the forum!

Either really should work, but if you want to test some things, feel free to edit the /etc/passwd file and replace '/bin/sh' with '/bin/bash' for the user in question.

I'm wondering if you had a typo in the password for the user.. you can fix this by typing (as root):
Code:
passwd username
(replace username with the username of the user)
and following the prompts.

Good luck - let us know how it worked out.

Rob
Hi Rob thanks for your reply.
I was very careful in creating. and using the password, even creating more users with 'useradd'. Same result each Tim - mint login just returned to the login prompt.
I've been in the /etc/passwd file and changed from sh to bash and the new users now login to Mint as they should.
Guess I'll be using 'adduser' in future to avoid having to do the passed file edit.
Perhaps 'useradd' is intended for 'Terminal' work only.
Thanks again.

Steve
 


Members online


Top