Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

User and rights management

2025-01-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Users:

Concept:

User: is a resource use isolation mechanism that identifies each user, and the user is the user

ID: a special ID that identifies an individual in a computer, providing a unique usage ID for each user, and this unique usage ID is the user's id

Authentication: the process of determining through a scheme that a user associates it with a user identity in the system through some identification technology.

Password: it is a means of authentication. User name corresponds to one user.

Authorization: the ability to operate resources, the level of use of resources

Audit: supervise the use of authority

Group: user group: a container for users to facilitate permission assignment

User category:

Ordinary users: divided into system users and login users

The user ID (UID) library address is located in the system: / etc/passwd

The group ID address is located at: / etc/group

Password library address: / etc/shadow

Group password Library: / etc/gshadow

Rights Management:

Rights management: permissions restrict users' operations on files

Rwxrwxrwx: three digits from the left: defines the permissions of users, defines the permissions of user groups, and defines the permissions of other users.

Permissions: r:read, read w:write, write x:excute, execute

File: r: data of the file can be obtained w: data of the file can be modified x: this file can be run as a process

Table of contents:

R: you can use the ls command to get a list of all the files under it

W: you can modify the list of files in this directory: that is, create or delete files

X: you can cd to this directory, and you can use ls-l to get detailed attribute information for all files

Permission combination mechanism: it can be expressed in octal: rDNA 4 wt 2 x x 1 plus conversion

Example: rw-rw-r-664 rwxrwxr-x 775

Rights management commands:

There are three types of users: U-owner g-group o-other a-all

Chmod command:

Format: three:

(1) chmod directly operates the ownership limit rwx of a class of users

Example: # chmod g=rw fstab belongs to the group with read and write

# chmod uprirwx GRW fstab o = the owner has read and write execution, the group has read and write, and the others do not have any permissions

# chmod ug=r fstab owners and groups have read permissions

# chmod uprirwxdir _ RWX _

# chmod go= fstab belongs to groups and others do not have any permissions

"A permission used for direct operation of a class, rperior wpje x. To express the use of upright recording, galling, recording, writing, etc.

Example: # chmod Umurx fstab owner removes the execution permission

# chmod otakr fstab other plus read permissions

# chmod ug+x fstab owners and groups all add execution permissions

# chmod g-wx fstab belongs to the group without write and execute permissions

# chmod + x fstab all have execute permission

# chmod + w fstab Note: global writes are only valid for owners

The simultaneous operation of multiple types of permissions can be separated by commas:

Example: # chmod utilise Grunw fstab

(2) Octal representation:

Example: # chmod 660fstab

(3)

Example: # chmod-reference=/var/log/mes fstab

Fstab and mes permissions are the same

Option:-R: recursive modification (file permissions in the directory are also modified, use with caution)

Dependency management commands: chown, chgrp

Chown command:

Option:-R recursive modification

Example: # chown-R doker skel/ skel directory internal file ownership is changed to doker group:

Example: # chownn-R archlinux:mygrp skel/ (colons can also be replaced by dots)

Refer to one and change the other:

Example: # chown-R-reference=/tmp/moosefs/ / tmp/skel/

Chgrp: can only be used to reorganize

Note: the user has write permission to the directory and no write permission to the file in the directory. You can delete this file.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report