Advance User Management
Advance User Management
USER
MANAGEMENT
IN LINUX
BY - Gauri Yadav
LIST OF TOPICS
An unlocked user account never has its password field begin with an
exclamation mark (!).
Step 2 : Unlock the account with either of the
following:
usermod -U user700
OR
passwd -u user700
Step 3 : verify
grep user700 /etc/shadow
Step 4 : lock the account with either of the following:
usermod -L user700
OR
passwd -l user700
Step 5 : verify
grep user700 /etc/shadow
What are Linux Groups?
Linux groups are collections of one or more users with
identical permission requirements on files and directories.
They allow group members to collaborate on files of common
interest.
Group information is stored in the /etc/group file and the
default policies in the /etc/login.defsconfiguration file.
Furthermore, the /etc/gshadow file stores group administrator
information and group-level passwords.
How to manage Linux
Groups?
Group management tools—groupadd, groupmod, and groupdel
—and looks at how to utilize them to create, alter, and remove
groups. Additional group administration operations, such as
adding and deleting group administrators, and setting and
revoking group-level passwords, are beyond the scope.
This set of management commands is used to add, modify,
and delete a group from the system.
The groupadd command adds entries to the group and
gshadow files for each group added to the system.
The groupadd command picks up the default values from the
login.defs file.
You can modify the attributes of a group with the groupmod
command. The syntax of this command is very similar to the
groupadd with most options identical.
The only flag that is additional with this command is -n, which
can change the name of an existing group.
The groupdel command is straightforward. It removes entries
for the specified group from both group and gshadow files.
Types of group commands?
How to Create a Group and
Add Members?
Lets understand this by a real time example:
Scenario:
,you will create a group called linuxadm with GID 5000 and
another group called dba sharing the GID 5000. You will add
user1 as a secondary member to group linuxadm
Step 1 : su - user100
Step 1 : su - user100
&
whoami
&
logname
The whoami command returns the effective (current) username (user100), and
the logname command reports the user’s real (original) username (root).
How to work as Superuser?
YOU