useradd error - bash: useradd: command not found

 

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


Post a Comment



We use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you.