- Create a new user account
[root@server ~]# 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)
Then give a username and password
Count the login users
[root@server ~]# who
- Changing your own password as a normal user
[uddika@server ~]$ 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@server ~]$ chage -l uddika
Change the current password properties
[root@server ~]# chage uddika
- The things that happened automatically once you create a user account
[root@server ~]# 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@server ~]# id Uddika
The user account database and the group account database will be automatically updated
- User account database
[root@server ~]# cat /etc/passwd |more
Display last 10 records
[root@server ~]# tail /etc/passwd
Display last 5 records
[root@server ~]# tail –n5 /etc/passwd
- Group account database
[root@server ~]# cat /etc/group |more
[root@server ~]# tail /etc/group
- How to delete user account
[root@server ~]# tail /etc/passwd
Delete with home folder
[root@server ~]# userdel –r username
Delete without home folder
[root@server ~]# userdel username
Verify the account
User account - [root@server ~]# tail /etc/group
Home folder - [root@server ~]# ls -l /home
- Deleting Groups
[root@server ~]# tail /etc/group
Delete the group
[root@server ~]# groupdel groupname
Verify group
[root@server ~]# tail /etc/group
------------------------------------------------------------------------------------------
0 comments:
Post a Comment