For adding a new user first login as root using su – then use command useradd username this will create n new user to check detail of user use id username it will show user detail.
login as root
1 2 | [abc@localhost ~]$su - password: |
give the following command
1 | [root@localhost ~]#useradd manish |
check user is created or not
1 2 | [root@localhost ~]#id manish uid=501(manish) gid=501(manish) groups=501(manish) |
it will give id of user if it is created
assigning password to manish
1 2 3 4 5 6 7 8 | [root@localhost ~]#passwd manish Changing password for user manish. New password: linux BAD PASSWORD: it is too simplistic/systematic BAD PASSWORD: is too simple Retype new password: linux passwd: all authentication tokens updated successfully. [root@localhost ~]# |
You have created user manish with password linux