Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Wednesday, December 7, 2011

User Administration

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:

  • Administrator
  • General
  • Service
/etc/passwd file contains information as follows:-
  
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.
The above three commands can do all for your user administration tasks. These commands can be used with different options to do a lot of different things.

NOTE: Default User ID for a regular user starts from 501 and onwards.

No comments:

Post a Comment