User Administration in linux

In linux we have 3 types of users which are

1.Super User(Root): It is a default user which created while installing the operating system.root is the super user in linux.

2.System User: These users are created automatically by the operating system.Its function is managing system services.

3.Normal User: These are created by super user that is root user

To identify users system assign UID.

UID for Root user – (0)

UID for system user- (1-499)

UID for Normal user -(1000-60,000)

NOTE:

  • After creating user,user home directory will be created in default path /home.
  • group will be created with same username.
  • Mail account is created with same username at /var/spool/mail/username

useful commands:

useradd/adduser  username –> To create user.

The created user information is stored in file  /etc/passwd

1.1usercre

userdel username –> To delete user

Note: we can delete the user but the corresponding home directory and mail account  can not be done with above command.

so we have to delete by :

rm -rf /home/username –> To delete home directory of the created user

rm -rf  /var/spool/mail/username –>To delete mail account

userdel -r username –> To delete user along with home directory

useradd –u <UID> <user name>         – create user with specific UID.

passwd username     –     change the user password

userdel username     –     delete user

userdel username     –     delete user including home directory

finger username      –      see user properties

chfn username        –      change user information