Friday, January 1, 2021

User Administration

User:

root can create user and give privilege for User can login in linux machine and access all directory and files and run command according to privileges .

There are 5 types of users available in Linux.

 Type of User  Example User ID Group ID
 Super User  Root 0 0
 Normal User  ram,kalu  etc. 500-60000  500-60000
 System User  ftp, ssh, apache etc 1-499 1-499
 Network User  Remote user like LDAP userSame as
normal users
 Same as
normal users
 Sudo User  Normal users with admin privileges Same as
normal users
 Same as
normal users

1.Users and groups are used to control access to files and resources.

2. Users can login to the system by supplying username and passwords to the system.

3.Every user in the system is assigned a unique user id (uid) and group id (gid).

4.User names and user id are stored in /etc/passwd file.
ex: cat /etc/passwd (show all user list)

5.User's passwords are stored in  /etc/shadow file in an encrypted form.

ex : cat /etc/passwd

6.Users are assigned a home directory and a shell to work with the O/S.

7. Users cannot read, write and execute each other's files without permission.

8. Whenever a user is created a mail box is created automatically in /var/spool/mail location.
9 .User Environmental files .bash_logout, .bash_profile,.bashrc etc .
user environmental files like .bash_logout, .bash_profile, .bashrc , ...etc.

Example : how to create user in linux .

How to assign the password to normal user:-

# useradd  tom                           
# passwd -S tom
 
(to see the status of the password of that user. if root user is not assigned the password then the password status is locked) 

# passwd -d tom   (then delete the password for that user)
 


No comments:

Post a Comment