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

How to skip input username and password when booting in Linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

How to skip user name and password input in Linux? I believe many inexperienced people are at a loss about this. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Linux skips entering username and password when booting

Omit password authentication

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 from it, so that root users don't need a password. The same goes for other users.

Omit the input user name

Modify / etc/inittab

In inittab, the configuration is as follows:

O0:12345:respawn:/sbin/getty-L 115200 ttyO0

We can skip the user name and password entry simply by modifying it to not execute gettty but to execute a script we wrote. Drop a script file log in the root directory (note the permissions of the script file, I set it to 777 here), and modify it as follows:

O0:12345:respawn:/log-L 115200 ttyO0

The log script file is as follows

#! / bin/sh

/ bin/login-f root

After reading the above, have you mastered how to skip entering the user name and password in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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

Internet Technology

Wechat

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

12
Report