User and User group management
A Linux system is a multi-user multitasking operating system that may have multiple users working in one system at the same time. There are three main types of users in Linux
- root user : Also known as Superuser, with the highest privileges to manage other users
- Virtual User: The virtual user is the user who is logged into the shell as/sbin/nologin, such users cannot log into the system. such as Ftp,apache users, etc.
- Normal User : This type of user can log into the system, when this can operate their own home directory content.
A user group is a collection of users of a class with the same characteristics, which makes it easier to manage the organization as a group. Files in Linux can be set permissions by group
View user Information
- Use the ID command to view user information
UID: The user's ID, generally unique
GID: The ID of the user group, generally unique
Groups: The group where the user resides
- Use the finger command to view user information
centos6.4 is not installed by default, perform the Yum–y install finger installation.
- View/etc/passwd File
The password file is specified in the/etc/shadow file. The format of these two files is described in the following sections
User add
Use Useradd or adduser (just a link to useradd)
Useradd command only root and root of the same group of users have Execute permissions, other users do not have permission to add users (will be reported Permission denied error)
Below we will add 5 users
Not to be continued ...