adduser : Linux Command- Create New User account

What is adduser command?

  • In Linux, a ‘useradd‘ command is a low-level utility that is used for adding/creating user accounts in Linux and other Unix-like operating systems.
  • The ‘adduser‘ is much similar to useradd command, because it is just a symbolic link to it.
  • 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).

When we run ‘useradd‘ command in Linux terminal, it performs following major things:

  • It edits /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow files for the newly created User account.
  • Creates and populate a home directory for the new user.
  • Sets permissions and ownerships to home directory.

Basic syntax of command adduser:

useradd [options] {username}

Note:- To run this command, you have to logged in as root user or you have the root user privileges.

Example of adduser command:

# useradd satya

Set user Password in Linux:

Without password user account will be in locked status. To unlock the account, you need to use above passwd command. Use passwd command to assign a password and set password aging guidelines.

Basic syntax of command adduser:

passwd {username}

Example of adduser command:

passwd satya

Now let see the complete example:

[root@test ~]# useradd satya

[root@test ~]# passwd satya
Changing password for user satya.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

 

 

Related Posts

  • 61
    To add a user to the system: Issue the useradd command to create a locked user account: useradd   Unlock the account by issuing the passwd command to assign a password and set password aging guidelines: passwd  How to Delete a User Should you find that you find that you no longer want to have…
    Tags: user, command, add, password, passwd, account, useradd, create, set
  • 35
    Use the blow command to set the linux date #date 072511242014 where 07= mm (Month) 25=dd (Date) 11=hh (Hour) 24=mm (minute) 2014=yyyy (Year)
    Tags: linux, command, set

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: