In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to understand the file permissions and user identity under Linux, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
Everything is a file in Linux, so read, write and execute files in Linux, how to add, modify and delete user information in Linux system, and how to use SUID,SGID,SBIT to set system permissions.
Linux is a multi-user, multi-task operating system with good stability and security. One of the original intentions of the design of Linux is to meet the needs of multiple users working at the same time, so user security is very important.
Useradd
You can use useradd to create a user account. When you create a user account using this command, the default user home directory is in / home, the default shell command is / bin/bash, and a basic user group with the same name as the user is created by default
Groupadd
Users create user groups, and in order to efficiently assign permissions to users in the system, they often put multiple users into one group in their work, so as to uniformly arrange permissions and other operations.
Usermod
To modify the user's attributes, everything in Linux is a file, so modifying the user's attributes is essentially the process of modifying the configuration file.
Passwd
Used to change password, expiration time, authentication information, ordinary users can only change their own password
Userdel
To delete a user, when we confirm that a user will no longer log in, we need to delete all messages for this offer. When we delete, the home directory will be retained by default, and you can use-r to delete it at the same time.
Special permissions for files
In the complex and changeable production environment, simply setting the rwx permissions of files can not meet our needs for security and flexibility, so we have the special permission bit of SUID,SGID,SBIT, which is a special function of setting file permissions.
SUID
Is a special permission to set the binary program, which allows the executor of the binary program to have the authority of the owner temporarily.
SGID
There are two main functions: first, let the executor have the permission to belong to the group temporarily. Second, files created in a directory automatically inherit the user groups of that directory
SBIT
The server can set specific directories, so in order to protect the files inside from being maliciously deleted, you need SBIT. When SBTI is set, only the executor can delete it.
Charrt
Used to set hidden permissions for files
Lsattr
Hidden permissions used to show files
Setfacl
ACL rules used to manage files. The so-called ACL rules actually control the read and write permissions of a single user or user group other than the read and write permissions of the owner, the group to which they belong, and others.
Getfacl
Used to display ACL information set on the file
Su
Switch user identity
Sudo
Give ordinary users extra permissions to perform things that root administrators should be able to do
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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: 221
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.