Topics covered in this videos:
USER AND GROUP ADMINISTRATION (PART- I USER ADMINISTRATION):
Some Important Points related to Users:
1. Users and groups are used to control access to files and resources
2. Users login to the system by supplying their username and password
3. Every file on the system is owned by a user and associated with a group
4. Every process has an owner and group affiliation, and can only access the resources its
owner or group can access.
5. Every user of the system is assigned a unique user ID number ( the UID)
6. Users name and UID are stored in /etc/passwd
7. User’s password is stored in /etc/shadow in encrypted form.
8. Users are assigned a home directory and a program that is run when they login (Usually a shell)
9. Users cannot read, write or execute each other’s files without permission
In Linux there are three types of users:
1. Super user or root user:
Super user or the root user is the most powerful user. He is the administrator user.
2. System user:
System users are the users created by the softwares or applications. For example if we install
Apache it will create a user apache. These kinds of users are known as system users.
3. Normal user:
Normal users are the users created by root user. They are normal users like Rahul, kishore and jaikrith etc.
Only the root user has the permission to create or remove a user.
Whenever a user is created in Linux things created by default:
1. A home directory is created(/home/username)
2. A mail box is created(/var/spool/mail)
3. unique UID & GID are given to user & group
Linux uses UPG (User Private Group) scheme
1. It means that whenever a user is created is has its own private group
2. For Example if a user is created with the name Rahul, then a primary group for that user will
be Rahul only.
There are two important files a user administrator should be aware of
1. "/etc/passwd"
2. "/etc/shadow"
LAB WORK:
Creating a user:
• The syntax for creating a user in Linux is
useradd option username
Options are:
• -u user id
• -G Secondary group id
• -g primary group id
• -d home directory
• -c comment
• -s shell
Let’s create a user with default attributes:
1. When no option is used with useradd command the options like UID, GID, home dir and shell will be assigned default.
#useradd username
#useradd ktusr
Observe that the uid, gid, home dir, and shell is assigned automatically.
Let’s create a user with our own attributes:
• Create a user with following attributes
• Name = ktuser2
• uid=505
• gid=505
• home dir = /home/kernel
• comment =salesman
#useradd ktuser2 –u 505 –d /home/kernel –c salesman
Assigning password to the user:
• As a root user we can assign any password to any user
• The syntax for assigning a password is
• #passwd to assign password to current user ( the one with which you have logged in, if it is
root then root’s password will be changed)
• #passwd user name to assign a password to a specific user, only root can assign
password to other user.
Modifying the user’s attribute:
• After creating a user if we need to modify the attributes of user like changing uid, changing
secondary group id or adding a comment, locking or unlocking the user account, can be done by following command.
• Syntax. # usermod options username
Options:
• all the options which are used with useradd command can be used and also the following,
• -l to change login name
• -L to LOCK account
• -U to UNLOCK account
ex:- # usermod -l newname oldname (changing the name of the user)
ex:- # usermod -L newname to lock the user account
ex:- # usermod -U newname to unlock the user account
Note: - when an account is locked it will show! (Exclamation mark) in /etc/shadow file
Locking and unlocking a user account:
• To lock a user a/c use the following
#usermod –L user name
#usermod –L ktuser2
Linux User Management: Everything You Need to Know,how to use useradd command,linux useradd with password,groupadd command in linux,groupadd in linux,groupadd,usermod command not found,usermod group 'sudo' does not exist,usermod linux,userdel,userdel command in linux,userdel linux,linux,User and Group Administration in Linux: Complete Guide for Beginners,linux, linux systemctl, systemctl command, systemctl in linux, linux services, Linux service management, systemctl tutorial, Linux in Telugu, systemctl commands, managing Linux services, systemd tutorial, Linux administration, systemctl guide, Linux system management, Linux systemctl in Telugu, system services Linux, Linux server management, systemctl explained, systemd in Telugu, Linux for beginners, Linux system services, systemctl for beginners, Linux systemctl commands,useradd, usermod, groupadd, useradd command, usermod command, manage user in linux, how to add group in linux in telugu, how to add user in linux in telugu, groupadd command, linux user account management telugu, linux user creation, how to create user in linux telugu,Everything About Linux Users, UIDs, and Home Directories