Chapter 4[Managing User Accounts in Ubuntu]
Chapter 4[Managing User Accounts in Ubuntu]
MANAGING USER
ACCOUNTS IN UBUNTU
Content:
• User Management
• Group Management
User Management
Creating User Accounts
Creating users in Gnome (GUI) is provide to create a normal user by using the
graphical tool, The user creation graphical tools are available in Graphical setting.
User Management
Click add user,
User Management
Type username and password, The password should have 8 values by letter &
number, punctuation and symbols, else you can create at first login, You can make
this user as admin
User Management
The useradd command determines the default values for new accounts by
reading the /etc/login.defs and /etc/default/useradd files.
UID_MIN 1000
UID_MAX 60000
SYS_UID_MIN 200
SYS_UID_MAX 999
GID_MIN 1000
GID_MAX 60000
SYS_GID_MIN 201
SYS_GID_MAX 999
CREATE_HOME yes
User Management
Modifying users with usermod
• A group is a collection of users that need to share access to files and other system
resources. Groups can be used to grant access to files to a set of users instead of just a
single user.
• Like users, groups have group names to make them easier to work with. Internally, the
system distinguishes groups by the unique identification number assigned to them, the
group ID or GID.
• The mapping of group names to GIDs is defined in databases of group account
information. By default, systems use the /etc/group file to store information about local
groups.
Each line in the /etc/group file contains information about one group. Each group entry is
divided into four colon-separated fields. Here is an example of a line from /etc/group:
Every user has exactly one primary group. For local users, this is the group listed by GID
number in the /etc/passwd file. By default, this is the group that will own new files created
by the user.
Normally, when you create a new regular user, a new group with the same name as that
user is created. That group is used as the primary group for the new user, and that user is
the only member of this User Private Group.
The id command can also be used to find out about group membership for a user.
[user03@host ~]$ id
uid=1003(user03) gid=1003(user03) groups=1003(user03),10(wheel),10000(group01)
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Group Management
Creating group accounts
The groupadd command creates groups. Without options the groupadd command uses
the next available GID from the range specified in the /etc/login.defs file while creating the
groups.
The -r option creates a system group using a GID from the range of valid system GIDs listed
in the /etc/login.defs file.
To change a group later, use the groupmod command, as in the following example: