groupadd and useradd don't work

General support questions including new installations
Post Reply
bdahmen
Posts: 1
Joined: 2005/09/10 18:43:27
Location: New Jersey
Contact:

groupadd and useradd don't work

Post by bdahmen » 2007/11/28 16:08:39

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?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

groupadd and useradd don't work

Post by gerald_clark » 2007/11/28 16:24:43

Login as root, or "su -".

Rheinhardt
Posts: 5
Joined: 2007/11/23 18:35:04
Location: IL

Re: groupadd and useradd don't work

Post by Rheinhardt » 2007/11/28 18:53:11

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

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: groupadd and useradd don't work

Post by gerald_clark » 2007/11/28 19:04:48

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.

Post Reply