Linux file attributes of the user and group introduces the basics

A, Linux introduced a multi-user multi-tasking

     Linux / Unix is ​​a multiuser, multitasking operating system: Before talking about Linux account and group account management, we briefly understand the multi-user, multi-tasking operating system, the basic concept of.

1.1Linux single-user multi-tasking

 

 2) Linux system user roles divided

 

 

 

 root:

       The default is the root user, their UID and GID are 0.root users are the only real presence in every unix / linux operating system, you can log into the system through which the system can be operated in any files and commands. It has the highest administrative privileges.

       In a production environment, generally prohibit the root account by SSH remote connection to the server (to protect the emperor), of course, will change the default SSH port (to protect the palace) to enhance system security.

       Enterprise work: no special needs, should try to operate under a normal user tasks, rather than root.

       In the Linux system, uid 0 user is a super user. But usually do not do that, but sudo mention the right management, you can assign permissions down to each command.

general user:

        Such users are generally added by the operation and maintenance management system or a system administrator with root privileges of the. For example: dongdaxia these users can log into the system with the operating system, but only in their own home directory permissions addition, you can enter, or browse relevant directories (/ etc / var / log), but can not create, modify, and delete .

 

 Virtual Users:

 

 

Linux security optimization;

 

 

 

 

 

 

2) a user (user) Introduction

 

 

 

 

3) a user group (group) Introduction

         Briefly, linux system user group (group), the user is having the same characteristics (user) set;

 

 

 

 

 

 

 

3) users and user group profile introduction

    Account files in the Linux system has the / etc / passwd, / etc / shadow, / etc / group, / etc / gshadow four documents.

/ Etc / passwd ### --- user's profile

/ Etc / shadow ### --- user shadow password file

Walkthrough:

 

 

 

 

 

 

Small conclusion:

 

 4) associated with the user group profiles

/etc/group       #---用户组的配置文件

/etc/gshadow    # --用户组的影子文件

 

 小结论

1.groupadd 添加用户组会更改/etc/group、/etc/gshadow。

 

 Linux遇见的命令总结:

id ------查看用户和组信息

in-------创建软硬连接   -s软链接   (readlink)

du------查看文件和目录大小 -sh

 

Guess you like

Origin www.cnblogs.com/dongxu2019/p/11469567.html