problems with useradd
I am using what appears to be an outdated video tutorial on Linux as the step by step instructions are inconsistent with whats on ma screen. -using latest version of Kubuntu.
After using "su" to get to root i use "useradd" and then set passwd. But "ls" in home dir does not show the user added. Using "cat /etc/passwd", a long list of stuff comes up and at the end i see the user i created in "home/xxx:/bin/sh" dir. The users i can see (which were created at desktop) with the "ls" command are under "home/xxx:/bin/bash" dir. Using "useradd -D", shell is "SHELL=/bin/sh", which is different from the tutorial i am watching. When instructor does "useradd -D" command it is "SHELL=/bin/bash" I'm guessing since the user i created in the terminal defaulted to "/bin/sh" instead of "bin/bash" they are segregated? If so... 1)What are the commands to ls users in "bin/sh" in the terminal? Furthermore, what is the difference between /sh and /bash? 2)How do I move these users to "/bin/bash"? 3)Is there a way to make adduser default to "/bin/bash" instead of "bin/sh"? 4)any recommendations for free absolute beginner linux videos/tutorials, as the one i am using appears to be outdated? Apologies if post is redundant. Thanks in advance for any help! |
With the command man useradd you can read all the options and default values you want.
|
Quote:
Quote:
Quote:
Quote:
I think you are misunderstanding the content of /etc/passwd. the colon is a delimiter between options for each user. If you are looking for the users home directory, it will be in /home/username, if its not, then most likely you didnt use the -m option when you added the user. |
Hi collinv ,
to change the user shell just use option -s with the command useradd example : useradd -s /bin/bash <username> and you know answer of the rest of the question. thanks |
Quote:
Quote:
here is one from this bolg http://www.linuxquestions.org/questi...bin-sh-693231/ Quote:
Code:
#sudo usermod -s /bin/sh username Quote:
Code:
#sudo useradd -s /bin/sh -d /home/directory username Quote:
|
On RHEL type systems, default settings are in /etc/default/useradd
|
Thanks for help! Got it worked out! -totally new to linux and command line interface in general. To a total neophyte, the man pages are far from illustrative. I sincerely appreciate the live support that these forums provide, and your patience for us nubs.
|
If you got your answer mark the thread as "solved" :)
|
All times are GMT -5. The time now is 05:23 AM. |