In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1Difference between su su and Jol -.
After switching users, su is still under the current user's home directory, but not the switched user's home directory.
Su-after switching users, the current user environment variables are changed under the user's home directory. So switch users with su-command
2Jing sudo commands users to delegate power to ordinary users with root users.
Either visudo or / etc/sudoers can edit the file to delegate power to the corresponding users. It is recommended to use the visudo command to verify whether the command is miswritten.
Root ALL= (ALL) ALL
Root: for users who can use the sudo command
ALL: for hosts that can use sudo
(ALL): to execute commands in what capacity after using sudo can also be written as (root)
ALL: indicates which commands the user is allowed to run (command full path representation)
Sudo-l View the configuration commands in the sudo file
When ordinary users need most of the permissions, a small number of them can be used when they don't want them. Give it power instead of taking it.
3, permission settings of the file
File permissions
Rwx read and write execution
R-4
WMULMUPUR 2
X-1
U represents the owner
G represents all groups
O for other people
Modify file permissions method
Chmod 755 filename
Chmod ugo+x file name
4, directory permissions
Rwx read and write execution
R 4 can I view the contents of the directory ls
Can W2 be created, deleted or renamed under the directory
Does x 1 have permission to enter the directory cd
Modify directory permissions method
Chmod 755 directory name
Chmod ugo+x directory name
5The permissions of most files and directories in the Linux system are set to 644 and 755.
The maximum permission given by the file is 666
The maximum permission given by the directory is 777
Because the umask value set in the system is 0022
Umask modification / etc/profile
6. How to view and modify the permissions of file hidden attributes
View hidden file properties lsattr file name
Modify file hidden permissions
Chattr
A cannot be modified or deleted
I cannot be modified or deleted
Chattr + a
Chattr + I
Chattr-a
Chattr-I
7Med MD5 encryption
Encrypt a file to generate a fingerprint file. When the source file is modified, verify the encrypted file. It is often used in scheduled tasks.
Command:
Md5sum passwd generates encrypted fingerprint serial number
Md5sum passwd > passwd.txt inputs the encrypted fingerprint into the passwd.txt file
Md5sum-c passwd.txt verifies the fingerprint file. When the source file is modified, the verification will report an error.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.