useradd error - bash: useradd: command not found
To create a new user account under any Linux distribution use command called useradd. The system administrator is responsible for creating account. Login as root user (or use sudo command).
useradd command syntax:
useradd [options] {username}
Depending on command line options, the useradd command will update system files and may also create the new user’s home directory & copy initial files.
To become root, If you typed:
su
and not:
su -
linux create user account and error “bash: useradd: command not found” is common in this case. If you will only have your user PATH variable set which does not include /usr/sbin. If you use “su -” it will create a new shell for root. So wither run :
su -
useradd
or use direct:
/usr/sbin/useradd






















