In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1: why is there no user login interface when rebooting the file system?
In the file inittab, when:: respawn:-/bin/sh is executed, it goes directly to the command line, so the user login interface is not displayed, so adding the user login interface needs to be done here.
How to realize user login by 2:busybox
We know that busybox is a collection of many executable programs, and busybox also integrates user login commands, which are / bin/login and / sbin/gettty.
3: add user login interface
Combined with the above, just change:: respawn:-/bin/sh to:: respawn:-/bin/login or:: respawn:-/sbin/getty.
4: further improvement
Reloading the file system can find that the system has a user login interface, but can not log in, because we call the user login program when the system starts by modifying the inittab file, but we do not set the user name and user password.
In linux, the user name is managed by the / etc/passwd file, and the user password is managed by etc/shadow. The format of these two files can be self-Baidu, which will not be described here. So we just need to copy the / etc/passwd and / etc/shadow files in ubuntu to the / etc directory in the root file system, and of course we need to modify the format accordingly.
There are only root users in busybox, so you can delete the information of ordinary users in passwd. At the same time, you have to modify the directory entered by root users when logging in. At the same time, delete the login password of the corresponding root users in shadow. The password of root users can be modified using passwd root after login.
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.