Linux user administration commands


Linux User Administration

Linux is a multi user and multitasking OS. In Linux, you can create any number of user account and groups. A user is always connected to a particular group and there can be any number of groups as well.

The user home directory by default is created under "/home" directory with the user name. e.g. User sun has home directory "/home/sun", the mail account is created under "/var/spool/mail/".

Each user and group in the system is identified by a unique no called as ID.

There are two types of user:

1) System users 
2) Normal users

The system users have ID values from 0 to 499  & the normal users can have ID values from 500 to 60,000.

The users and groups are maintained by the four databases files. These are:

1) /etc/passwd : This databases file maintains the user information like UID, GID, User name etc.
2) /etc/shadow : This file maintains user password related information like uname, encrypted pwd, etc. The pwd's are encrypted in the pwd binary file. To encrypt the passwords, MD5sum, DES algorithms are used.
3) /etc/group : It maintains group related information like group name, GID, etc.
4) /etc/gshadow : It maintains the group password related information. 

User administration :

For user administration five commands are used.

1) useradd : This command is used to create a new user with default values.
$useradd <options> <user-name>

where the options can be,

-U = User id
-g = group ID (primary)
-G = group ID (secondary)
-c = comment
-d = directory 
-s  = shell 
-f  = inactive days
-e = expire date (YYYY MM DD)
  
2) usermod : This command is used to modify the user accounts. Only the administrator can use this command. It's syntax is,
$usermod <options> <user-name>
  
where the options can be,        

-l = to change the user name
-L = to lock the user account
-U = to unlock the user account

3) passwd :  This command is used to generate the passwords for users account.
$passwd < user-name> 
                    
To disable a password,
$passwd -d <user-name>

4) userdel : This command is used to delete a user account.
$userdel <user-name>

5) change : This command is used to change the password expiry information. 
$chage <user name>

6 comments:

Good post contained the basic information for the Linux newbies, If you are looking for Linux training go for the kernel training.

That is really interesting!

iPhone unlock Chennai

We are a third party technical support service. Avast Customer Support is here to help you out with the whole procedure to Download Avast Antivirus online, We not only fix your Avast Support related issues but will guide with how to get started with your new Avast product once it gets installed successfully.We at Avast Tech Support provides service to protect your PC from potential online threats and external attacks like viruses, Trojans, malwares, spywares and phishing scams. And Avast Refund. Call on our Avast Phone Number.
Norton Tech Support is a third party service provider and not in any way associated with Norton or any of its partner companies. At Norton Support we offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices.

[url=http://supportfornorton.com/ ]Norton Tech Support[/url] is a third party service provider and not in any way associated with Norton or any of its partner companies. We offer support for Norton products and sell subscription based additional warranty on computer and other peripheral devices. Call our Toll Free number 1 855 966 3855

The Antivirus Package protects one device and works on IOS, Windows, Android and MAC. It includes real time protection, virus, spyware, Malware and phishing protection.

Norton.com/setup
Norton.com setup
Norton setup

Post a Comment