Add a New User in Linux

How to Add a New User in Linux

 

To add/create a new user, all you’ve to follow the command ‘useradd‘ or ‘adduser‘ with ‘username’. The ‘username’ is a user login name, that is used by user to login into the system.

[root@centos ~]# useradd centos

When we add a new user in Linux with ‘useradd‘ command it gets created in locked state and to unlock that user account, we need to set a password for that account with ‘passwd‘ command.

[root@centos ~]# passwd centos

Once a new user created, it’s entry automatically added to the ‘/etc/passwd‘ file. The file is used to store users information and the entry should be.

For any query or issue, feel free to discuss on http://discuss.eduguru.in