Page 1 of 1

adding user from command line

Posted: 2006/11/24 08:56:28
by thecoolone
I tried to add a new user using the command line commands "useradd" and "adduser" but with no luck. The user names are added but i cannot login into the system using the just created username and password. Whats wrong?? y isint it working??
And also i wanted to know that when i login as a regular user and then use "su" in the terminal and then as root in the terminal try to do "adduser" command it says "bash command not found". why does this happen. im a superuser in the terminal and y cant i execute the "adduser" command.

And finally i would like to know if there is a way to manually add a user in the centos remotely from the command line. This is very important to me right now.

any advice is welcomed.

thanx in advance

adding user from command line

Posted: 2006/11/24 13:58:55
by K_Frye
thecoolone wrote:
I tried to add a new user using the command line commands "useradd" and "adduser" but with no luck. The user names are added but i cannot login into the system using the just created username and password. Whats wrong?? y isint it working??


http://www.centos.org/docs/4/html/rhel- ... -line.html

Look closely at the two steps described in section 33.5.1.

And also i wanted to know that when i login as a regular user and then use "su" in the terminal and then as root in the terminal try to do "adduser" command it says "bash command not found". why does this happen. im a superuser in the terminal and y cant i execute the "adduser" command.


It's all about the path. Use "su -" instead of just "su".

And finally i would like to know if there is a way to manually add a user in the centos remotely from the command line.


Of course. See the above link.

Re: adding user from command line

Posted: 2008/11/07 06:39:33
by albertsk
It took a few minutes to find out the location of "adduser". Here we go.

[color=FF0000][font=Georgia]/usr/sbin/adduser[/font][/color]


:lol:

Re: adding user from command line

Posted: 2008/11/07 13:49:59
by AlanBartlett
To the OP -- please check the CentOS wiki. It's a valuable resource. Assuming root powers.

Re: adding user from command line

Posted: 2008/11/07 15:51:59
by toracat
And also i wanted to know that when i login as a regular user and then use "su" in the terminal and then as root in the terminal try to do "adduser" command it says "bash command not found". why does this happen. im a superuser in the terminal and y cant i execute the "adduser" command.


It's all about the path. Use "su -" instead of just "su".

For this, I'd like to refer the OP to:

http://wiki.centos.org/TipsAndTricks/BecomingRoot

Re: adding user from command line

Posted: 2008/11/08 13:14:35
by scottro
I have my own page on this, as it's such a frequent question on Fedora forums

http://home.nyc.rr.com/computertaijutsu/rhpath.html

(On the other hand, I think most of the info is already given in the provided links--but I hate to be left out). :)