0% found this document useful (0 votes)
2 views

User&group

Uploaded by

alokkumara2148
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

User&group

Uploaded by

alokkumara2148
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

User account

The person who user the computer called local user

Super user system user normal user

(root) services standard user

0 1-999 1000-60000

User datais

/root –super user home directory

/home- normal user home directory

File of user account information

/etc/passwd-all user information

/etc/shadow-all user account password information

Command for manage user accounts

To make user account:- useradd username \adduser username

Passwd user name set all detais

Set password

To create full name user accout

Usermod -c pankaj pandi pankaj

To rename user account

Usermod –l newname oldname

To change shell user account

Usermod –s /sbin/nologin username

Usermod –s /bin/bash username

To delete user account


Userdel username

Group Management
Linux, a group is a collection of users. The main purpose of the groups is to
define a set of privileges like read, write, or execute permission for a given
resource that can be shared among the users within the group

Linux Groups

There are two types of groups that a user can belong to:

 Primary or login group – is the group that is assigned to the files


that are created by the user. Usually, the name of the primary group is
the same as the name of the user. Each user must belong to exactly
one primary group.
 Secondary or supplementary group - used to grant certain
privileges to a set of users. A user can be a member of zero or more
secondary groups.

Super group system group normal Group

Root group services group standard group

0 1-999 1000-60000

File of group information

/etc/group-all group information

/etc/gshadow-all groups password & policy information

To create group

Groupadd groupname

To rename group

Groupmod -n newname oldname

To change group id

Groupmod -g 2100 groupname


To add user in group

Usermod -G groupname username

To delete group

Groupdel groupname

To remove user from group

Gpasswd -d username groupname

To add new user to existing group

Useradd –G existinggroup newuser

To add single user to many group

Usermod -G 1stgroup,2nd Group username

To add user in primay group

Usermod -g groupname username

You might also like