- Create a new user account
[root@daddylinux~]# useradd uddika
[root@daddylinux~]# passwd uddika
Changing password for user uddika.
New UNIX password: ******
Retype new UNIX password: *****
passwd: all authentication tokens updated successfully.
- Multisession Login(Users can login same time)
Alt+F2
Then give a username and passwordCount the login users
[root@daddylinux~]# who
- Changing your own password as a normal user
[uddika@daddylinux~]$ passwd
Changing password for user uddika.Changing password for uddika.
(current) UNIX password: ******
New UNIX password: *******
Retype new UNIX password: *******
passwd: all authentication tokens updated successfully.
- How to change the password properties of a user
[uddika@daddylinux~]$ chage -l uddika
Change the current password properties
[root@daddylinux~]# chage uddika
- The things that happened automatically once you create a user account
[root@daddylinux~]# ls -l /home
Every user will get a private group account
Username = Uddika Private Group name = Uddika
Every user will get a user id (uid) and group id (gid)
[root@daddylinux~]# id Uddika
The user account database and the group account database will be automatically updated
- User account database
[root@daddylinux~]# cat /etc/passwd |more
Display last 10 records
[root@daddylinux~]# tail /etc/passwd
Display last 5 records
[root@daddylinux~]# tail –n5 /etc/passwd
- Group account database
[root@daddylinux~]# cat /etc/group |more
[root@daddylinux~]# tail /etc/group
- How to delete user account
[root@daddylinux~]# tail /etc/passwd
Delete with home folder
[root@daddylinux~]# userdel –r username
Delete without home folder
[root@daddylinux~]# userdel username
Verify the account
User account - [root@daddylinux~]# tail /etc/group
Home folder - [root@daddylinux~]# ls -l /home
- Deleting Groups
[root@daddylinux~]# tail /etc/group
Delete the group
[root@daddylinux~]# groupdel groupname
Verify group
[root@daddylinux~]# tail /etc/group
How to create user through command line without his/her home directory?
ReplyDelete-M
ReplyDelete