User Management (1) - RHCSA
User Management
In this blog we are briefly discussing about user management. There are 3 main parts.- Add user
- Delete user
- Modify user
Who is the user?
A person who uses the system. Users haven't expert knowledge about the system. He or she can do what they are assigned to. We assign that limitations to user account.What is a User account?
User account is a logical representation of a real user. We cannot assign limitations to the person who connect with the system in physically. To full fill that gap users should log in to the system will be done through a user account. So we assign limitations to particular user account. (Scope)Prerequisites
- /etc/passwd contains information about local users.
- /etc/shadow is a user password database.
- Every user has uid (user id) and gid (group id)
- In some cases uid and gid are same
- But we can add different uid and gid manually
To retrieve information about Users
- tail command is used to retrieve last lines. for an example, if you want to retrieve last 5 lines of /etc/passwd file, you can use tail -n 5 /etc/passwd
- head command is used to retrieve first lines. for an example, if you want to retrieve first 5 lines of /etc/passwd file, you can use head-n 5 /etc/passwd
- id command is used to verify given user information. id susan gives informations about user susan.
- grep command is used to match patterns. for an example cat /etc/passwd | grep martin show the results of martin.
Add User
First you need to switch to the root. Use su - command.Now we can add users.
Type above command then user will be created. So after that you need to verify. For that use following commands.
If one of these command executed, then there is not any problem.
Comments
Post a Comment
Thank you for your comment