In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what is the method of omitting password in Linux". In daily operation, I believe that many people have doubts about the method of omitting password in Linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubt of "what is the method of omitting password in Linux?" Next, please follow the editor to study!
Linux omitting passwords is absolutely not recommended, but it is not impossible, because Linux omitting passwords poses a great threat to the security of the system.
1. Omit password authentication
Very simple, just change the root:x:0:0:root:/root:/bin/bash in / etc/passwd to root::0:0:root:/root:/bin/bash, which is to remove the x, so that root users do not need a password. The same goes for other users.
2. Omit the input user name
(1) modify / etc/inittab
In inittab, you have the following configuration
1:2345:respawn:/sbin/agetty tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600
Indicates that the system can have six consoles, which can be switched with ALT+ (F1~F6). And / sbin/agetty is a login validator, execute it, will prompt the user for a user name and password, and then launch a specified shell (specified in the passwd file).
So, we just need to change it to not execute agettty, but to execute a script we wrote ourselves, and we can skip the user name and password input. The modifications are as follows:
1:2345:respawn:/root/logintest tty1 9600 (graphical interface is 5, to be tested)
Here I put a test script in / root/ so that the script will be executed when the system starts, with the contents of the script:
#! / bin/sh
/ bin/login-f root (made executable, to be tested)
The script actually performs the login of a root user, and can be added to the script if there are other requirements.
In this way, we have done some lazy operations to make Linux omit password input.
At this point, the study of "what is the method of omitting passwords in Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
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.