PDA

View Full Version : useradd: command not found



geeare1
14th September 2006, 04:25 PM
Hi,
I'm following the Sourceforge instructions to get my Intel PRO/Wireless card to work. I've downloaded and installed the Regulatory Daemon and I'm attempting to remove root privileges using the following command as per the instructions but I get the following error message:

[root@bellsouth ~]# useradd ipw3945d -s /bin/false
bash: useradd: command not found
What am I doing wrong?

Thanks very much,
gr

sentry
14th September 2006, 04:26 PM
What's the output of which useradd ?

mr_manny
14th September 2006, 04:55 PM
What's the output of which useradd ?

# whereis useradd
useradd: /usr/sbin/useradd /usr/share/man/man8/useradd.8.gz

locate is your friend :D

# locate useradd
warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old
/etc/default/useradd
/usr2/share/man/fr/man8/useradd.8.gz
/usr2/share/man/man8/useradd.8.gz
/usr2/share/man/ja/man8/useradd.8.gz
/usr2/share/man/id/man8/useradd.8.gz
/usr2/share/man/pl/man8/useradd.8.gz
/usr2/share/man/it/man8/useradd.8.gz
/usr/bin/seuseradd
/usr/sbin/luseradd
/usr/sbin/useradd

homey
14th September 2006, 05:16 PM
When a user can't get a program to work even as root,
I think it is likely they forgot the dash ( - )



su -

geeare1
15th September 2006, 03:00 PM
Thanks to all who replied to my post. I had no idea you're supposed to put a dash after su!

Thanks again,
gr

sebnukem
15th September 2006, 11:52 PM
I belive that a su without a dash will just update your current UID. A su - (short for su -login) will log you in as root and update your environment accordingly, PATH included.

f14f21
17th June 2008, 05:45 PM
hi
login as root

#cd /usr/sbin
#./useradd username
please notice to "./"
have nice time

A.Serbinski
17th June 2008, 05:55 PM
It is not necessary to update the environment. There are two paths to look in for commands that are not available to normal users... /sbin and /usr/sbin. Bearing this in mind, you can always specify the full path to the command when executing the command....
su
/usr/sbin/useradd blah blah