Security context: Whether the user's uid/gid is in the owner/owner group of the file;
User (UID)/group (GID): identifier
Processes and files corresponding to user/group;
User Group Category:
Private group: A group that has the same name as the user name is created automatically when a user is created without specifying a group to which it belongs, only the user and the user is the same name.
Basic group: Default group for users
Additional groups, additional groups: groups other than the default group
Permissions:
R, W, X
File:
R: Readable, you can use similar commands such as cat to view the contents of the file;
W: writable, can edit or delete this file;
X: Executable, exacutable, can be at the command prompt as a command to submit to the kernel to run;
Directory:
R: You can perform LS on this directory to list all internal files;
W: Files can be created in this directory;
X: You can switch to this directory using a CD, or you can use Ls-l to view the details of the internal files;
Rwx
r--: Read-only
R-x: Read and Execute
---: No permissions
0---: No permissions
1 001--x: Execution
2 010-w-: Write
3 011-wx: Write and Execute
4 r--: Read-only
5 101 R-x: Read and Execute
6 rw-: Read and Write
7 111 rwx: Read and write execution
755:rwxr-xr-x
Rw-r-----: 640
660:RW-RW----
rwxrwxr-x:775
User database file: UID,/etc/passwd
Group database files: GID,/etc/group
[Email protected] ~]$ LL/ETC/PASSWD
-rw-r--r--. 1 root root 1427 June 2015/etc/passwd
[Email protected] ~]$
[Email protected] ~]$ Ll/etc/group
-rw-r--r--. 1 root root 760 June 2015/etc/group
Shadow password (password separate file):
Users:/etc/shadow
Group:/etc/gshadow
[Email protected] ~]$ Ll/etc/shadow
----------. 1 root root 813 June 2015/etc/shadow
[Email protected] ~]$ Ll/etc/gshadow
----------. 1 root root 623 June 2015/etc/gshadow
Configuration file:/etc/passwd
/ETC/PASSWD:
User name: Password: uid:gid: Comments: Home directory: Default Shell
[Email protected] ~]# CAT/ETC/PASSWD
Root:x:0:0:root:/root:/bin/bash
Bin:x:1:1:bin:/bin:/sbin/nologin
Daemon:x:2:2:daemon:/sbin:/sbin/nologin
Adm:x:3:4:adm:/var/adm:/sbin/nologin
/etc/group:
Group name: Password: GID: List of users with this group attached to the group
[Email protected] ~]# Cat/etc/group
root:x:0:
Bin:x:1:bin,daemon
Daemon:x:2:bin,daemon
Configuration file:/etc/shadow
/etc/shadow:
User name: Password: Last time the password was modified: Minimum Age: Maximum Age: Warning Time: Inactive time: Expiry time:
[Email protected] ~]# Cat/etc/shadow
Root:$1$gogw$wvzdzxlig3/vy/ws9jkbo0:16607:0:99999:7::: ($salt $ encryption password)
Bin:*:15937:0:99999:7:::
Daemon:*:15937:0:99999:7::: (! or * indicates lock, unable to login)
Adm:*:15937:0:99999:7:::
md5sum: Calculating and verifying the MD5 value of a file
NAME
Md5sum-compute and check MD5 message digest
Synopsis
md5sum [OPTION] ... [FILE] ...
[Email protected] ~]# md5sum Inittab
7fca9a5f4b914a3cdce30c2cacb6b97e Inittab
Useradd
[Email protected] ~]# Useradd Cxiong
[Email protected] ~]# tail-1/etc/passwd
Cxiong:x:501:501::/home/cxiong:/bin/bash
[Email protected] ~]# tail-1/etc/shadow
cxiong:!! : 17125:0:99999:7:::
[Email protected] ~]# tail-1/etc/group
cxiong:x:501:
[Email protected] ~]#
passwd
[Email protected] ~]# passwd Cxiong
Changing password for user Cxiong.
New Password:
Bad Password:it is the too short
Bad Password:is too simple
Retype new Password:
Passwd:all authentication tokens updated successfully.
[Email protected] ~]# tail-1/etc/shadow
Cxiong:$1$jawqgmus$xr.6srxj94ei7i862gcml.:17125:0:99999:7:::
Default configuration file:/etc/default/useradd
[Email protected] ~]# cd/etc/default/
[email protected] default]# LL
Total 8
-rw-r--r--. 1 root root 1756 NSS
-RW-------. 1 root root 119 useradd
[email protected] default]# cat Useradd
# useradd defaults file
group=100
Home=/home
Inactive=-1
Expire=
Shell=/bin/bash
Skel=/etc/skel
Create_mail_spool=yes
Groupadd MyGroup
[Email protected] default]# Groupadd MyGroup
[Email protected] default]# tail-1/etc/group
mygroup:x:502:
[Email protected] default]#
Linux Common Commands-users, groups, permissions, user profiles