In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to establish general users in the administrator group in the CentOS Linux system. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
In general, the average user can log in as a root user to configure the system at the administrator level by executing the "su -" command and entering the correct root password. However, in order to further strengthen the security of the system, it is necessary to establish a group of administrators, which only allows users of this group to log in as root users by executing the "su -" command, while users of other groups cannot log in as root users even if they execute "su -" and enter the correct root password. Under UNIX, the name of this group is usually "wheel".
[root@sample ~] # usermod-G wheel CentOSpub ← adds the general user CentOSpub to the administrators group wheel group
[root@sample ~] # vi / etc/pam.d/su ← opens this configuration file
# auth required / lib/security/$ISA/pam_wheel.so use_uid ← find this line and remove the "#" at the beginning of the line
↓
Auth required / lib/security/$ISA/pam_wheel.so use_uid ← changes to this state (approximately on line 6)
[root@sample ~] # echo "SU_WHEEL_ONLY yes" > > / etc/login.defs ← add statement to the end of the line
When you are done, you can create a new user, and then use this new user test to find that users who have not joined the wheel group execute the "su -" command and cannot log in as a root user even if they enter the correct root password.
The above content is how to build general users in the administrator group of the CentOS Linux system. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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: 278
*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.