One of the basic and most important task for a System Administrator is USER & GROUP administration. In Linux Users and Groups can be administered using command line as well as the user/group administration GUI tool. But I will suggest you to use command line as much as possible because in production environment GUI wont be provided.
In this section we learn how to create, delete, and do basic administration of USERS. The default settings for a user drives from the /etc/login.defs file .
/etc/passwd file is a default User Account Database. It is a world readable file, it contains information about all users in the system. Mainly there are three types of user accounts:
student:x:501:501:Student account:/home/student:/bin/bash
each field in above line is described in detail below:
student : User Name
x : encrypted password
501 : User ID
501 : Group ID
Student account : Discription
/home/student : Home Directory
/bin/bash : Default Shell
You can find all the users in your system and also get all the details in the /etc/passwd file.
The basic command for user administration are given below :
NOTE: Default User ID for a regular user starts from 501 and onwards.
In this section we learn how to create, delete, and do basic administration of USERS. The default settings for a user drives from the /etc/login.defs file .
/etc/passwd file is a default User Account Database. It is a world readable file, it contains information about all users in the system. Mainly there are three types of user accounts:
- Administrator
- General
- Service
student:x:501:501:Student account:/home/student:/bin/bash
each field in above line is described in detail below:
USER ADMINISTRATION |
student : User Name
x : encrypted password
501 : User ID
501 : Group ID
Student account : Discription
/home/student : Home Directory
/bin/bash : Default Shell
You can find all the users in your system and also get all the details in the /etc/passwd file.
The basic command for user administration are given below :
- useradd user_name :- used to add user and modify group membership.
- example : useradd student1
- userdel user_name :- delete a user form /etc/passwd.
- usermod :- modify user information.
NOTE: Default User ID for a regular user starts from 501 and onwards.
No comments:
Post a Comment