Get the App
SLTechnology News&Howtos  ›  Servers  › 

Commands related to linux rights management

Shulou Source: shulou.com Published: 2022-06-01 10:56:18 10月04日 Update

This article mainly introduces "linux rights management related commands". In daily operation, I believe many people have doubts about linux rights management commands. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "linux rights management related commands". Next, please follow the editor to study!

Preface

Practice makes perfect

Title

1. New user group, shengchan,caiwu,jishu

two。 The requirements for new users are as follows:

Tom is an additional user of the shengchan group

Harry is an additional user of the caiwu group

Leo is an additional user of the jishu group

Create a new admin user who does not belong to the three departments mentioned above

3. The requirements for creating a new directory are as follows:

* / pub directory is a public storage directory that can be read, written and executed by all users, but users can only delete files that belong to them.

* / sc directory for production department storage directory can only be written to production department personnel

And the documents established by the production staff are automatically assigned to the shengchan group.

* / cw directory for I Finance Department storage directory can only be written to Finance Department personnel

And the documents established by the staff of the finance department are automatically assigned to the caiwu group.

* admin users can use the touch tool to create files in the / sc directory and / cw directory, but cannot delete files

4. Set the permissions for ordinary users to create new files to "rmurf r -"

5. Set admin users to set up new users freely through sudo

Command

1. Create a new user group:

[root@workstation ~] # groupadd shengchan

[root@workstation ~] # groupadd caiwu

[root@workstation ~] # groupadd jishu

Results:

= > / etc/passwd / etc/group / home message

Tags: Users files directories permissions commands results additional management personnel production learning production user groups finance finance storage general ownership more power Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Redmi Shulou Information Huawei