Page 1 of 1

groupadd and useradd don't work

Posted: 2007/11/28 16:08:39
by bdahmen
I am kind of new to Linux. I have setup a CentOS 5 server which is up and running. I am trying to follow directions to add some services and software. Some of which instruct me to add users and groups. When I try to add a group via groupadd or usersadd it tells me bash: groupadd: or useradd: command not found? How do I enable these commands?

groupadd and useradd don't work

Posted: 2007/11/28 16:24:43
by gerald_clark
Login as root, or "su -".

Re: groupadd and useradd don't work

Posted: 2007/11/28 18:53:11
by Rheinhardt
Logging in as root won't magically find the file :)

Try the command "whereis useradd" Typically its in /usr/sbin/useradd but for some reason it wants you to type the full path. Give that a try and see if it works. You'll still need to be root or Super User to use it but now you can find where it is to execute it.

-Rhein

Re: groupadd and useradd don't work

Posted: 2007/11/28 19:04:48
by gerald_clark
Yes it will !
/usr/sbin is NOT in a normal user's PATH.
It IS in root's PATH.
You must be root to run this command.