Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-04-2008, 09:41 AM   #1
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Rep: Reputation: 15
Useradd not working

Useradd is totally not working

Here is my output from using it (with BASH):
[root@localhost ifeatu]# useradd
bash: useradd: command not found

Here is my output of sbin (where I'm assuming the command would be stored by default):
[root@localhost ifeatu]# cd /sbin
[root@localhost sbin]# ls
accton dosfsck ibod kpartx mkdosfs nologin rdisc sysctl
addpart dosfslabel icnctrl kpartx.static mke2fs pam_console_apply rdump tc
agetty dump ifcfg ldconfig mkfs pam_tally rdump.static telinit
alsactl dumpe2fs ifconfig loadndisdriver mkfs.cramfs pam_tally2 reboot tune2fs
arp dump.static ifdown logd mkfs.ext2 pam_timestamp_check resize2fs udevadm
arping e2fsck ifenslave logsave mkfs.ext3 parted restore udevcontrol
audispd e2image ifrename loopctrl mkfs.ext4 partprobe restorecon udevd
auditctl e2label ifup losetup mkfs.ext4dev partx restore.static udevsettle
auditd e2undo init lsinitrd mkfs.msdos pcbitctl rmmod udevtrigger
aureport ether-wake initctl lsmod mkfs.ntfs pccardctl rmt umount.cifs
ausearch ethtool initlog lspci mkfs.vfat pcmcia-check-broken-cis rngd umount.hal
autrace fdisk insmod lspcmcia mkinitrd pcmcia-socket-startup route umount.nfs
avmcapictrl findfs insmod.static lsusb mkswap pidof rpcbind umount.nfs4
badblocks fixfiles install-info lvchange mkzonedb pivot_root rpc.statd unix_chkpwd
blkid fsadm installkernel lvconvert modinfo plipconfig rrestore unix_update
blockdev fsck ip lvcreate modprobe poweroff rrestore.static update-pciids
capiinit fsck.cramfs ip6tables lvdisplay mount.cifs pppoe rsyslogd vboxd
cbq fsck.ext2 ip6tables-multi lvextend mount.fuse pppoe-connect rtmon vconfig
cfdisk fsck.ext3 ip6tables-restore lvm mount.nfs pppoe-relay runlevel vgcfgbackup
change_console fsck.ext4 ip6tables-save lvmchange mount.nfs4 pppoe-server runuser vgcfgrestore
chkconfig fsck.ext4dev ipmaddr lvmdiskscan mount.ntfs pppoe-setup salsa vgchange
cifs.upcall fsck.msdos ipppd lvmdump mount.ntfs-3g pppoe-sniff scsi_id vgck
clock fsck.vfat ipppstats lvmsadc mount.ntfs-fuse pppoe-start securetty vgconvert
consoletype fstab-decode iprofd lvmsar mpath_ctl pppoe-status service vgcreate
cryptsetup fuser iptables lvreduce mpath_prio_alua pppoe-stop setfiles vgdisplay
ctrlaltdel generate-modprobe.conf iptables-multi lvremove mpath_prio_emc ppp-watch setpci vgexport
debugfs genhostid iptables-restore lvrename mpath_prio_hds_modular pvchange setsysfont vgextend
delpart getkey iptables-save lvresize mpath_prio_netapp pvck sfdisk vgimport
depmod grub iptunnel lvs mpath_prio_tpc pvcreate shutdown vgmerge
dhclient grubby isdnctrl lvscan mpath_wait pvdisplay slattach vgmknodes
dhclient-script grub-install isdnlog MAKEDEV multipath pvmove sln vgreduce
dhcp6c grub-md5-crypt iwconfig mdadm multipathd pvremove start vgremove
divaload grub-terminfo iwevent mdadm.static multipath.static pvresize start_udev vgrename
divalog halt iwgetid mdassemble.static nameif pvs status vgs
divalogd hdparm iwlist microcode_ctl nash pvscan stop vgscan
dmraid hisaxctrl iwpriv mii-diag netplugd quotacheck sulogin vgsplit
dmraid.static httpd iwspy mii-tool netreport quotaoff swapoff weak-modules
dmsetup hwclock killall5 mingetty new-kernel-pkg quotaon swapon ypbind
Old 10-15-2008, 08:43 PM   #2
LQ Newbie
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
Not sure which distro you are using but in my Ubuntu 8.04 system, useradd is located in /usr/sbin . You can find it by using the find command like this: find / -iname useradd 2>/dev/null

Old 10-15-2008, 10:10 PM   #3
Registered: Apr 2006
Location: North Vancouver, B.C., Canada
Distribution: Fedora 14
Posts: 38

Rep: Reputation: 15
.. or you can type;

which useradd

and it will show the the exact path to where it is . . .
Old 10-15-2008, 11:15 PM   #4
Registered: Oct 2007
Distribution: Ubuntu 8.10 beta and Debian etch
Posts: 75

Rep: Reputation: 15
um you could do it though the command line but if u want the gui maybe try reinstalling it though redhats package manger applicaiton ?
just an idea :-)
Old 10-15-2008, 11:19 PM   #5
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
its in /usr/sbin. add /usr/sbin and /sbin to PATH in /etc/export or .bash_profile
Old 10-15-2008, 11:32 PM   #6
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 165Reputation: 165
As abolishtheun pointed out, it's normally in /usr/sbin (at least it is on my Slackware boxes).

Just a comment on locating commands... Since typing the command in a shell resulted in "command not found" then "which" won't find it either. The which command searches the user's PATH for the command. Try using slocate (e.g. slocate useradd) or find (e.g. find / -type f -name useradd).
Old 10-16-2008, 12:23 AM   #7
Registered: Oct 2004
Location: Sydney, Australia
Distribution: Mageia 6
Posts: 360
Blog Entries: 4

Rep: Reputation: 63
"whereis" is a better command to find out where it is.

on my fedora system it is in /usr/sbin/

Old 10-16-2008, 12:34 AM   #8
LQ Newbie
Registered: Oct 2008
Posts: 12

Rep: Reputation: 0
what about "adduser" command?
Install shadow-utils-4.0.3-60.RHEL4 to get this commands to work.

Old 10-16-2008, 04:08 AM   #9
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,418

Rep: Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398Reputation: 2398

lrwxrwxrwx 1 root root 7 2008-07-23 21:22 /usr/sbin/adduser -> useradd
Old 10-16-2008, 10:45 AM   #10
Registered: May 2008
Posts: 42

Rep: Reputation: 15
useradd is not working

According to question the command might have worked. First you install the package "shadow-utils" from your linux media.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC6 groupadd useradd Not working jCash Linux - Newbie 2 07-31-2007 10:37 PM
Useradd - not working as expected Paean Solaris / OpenSolaris 13 01-31-2006 05:06 PM
useradd not working haora Linux - Newbie 2 04-19-2005 08:37 AM
'useradd' not working. reesee Linux - Newbie 1 02-28-2004 01:05 PM
Useradd not working HaZaRdOuS Linux From Scratch 2 11-25-2003 11:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration