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

The reason why CentOS can't log on to root and its solution

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Why CentOS can't log in to root and how to solve it? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

Situation 1:

If the ssh terminal that is still connected is not disconnected, you can resume it by executing the following command:

# LD_PRELOAD=/lib64/libc-2.12.so ln-s / lib64/libc-2.12.so / lib64/libc.so.6

Case 2:

Ssh has been disconnected, unable to create a new ssh connection, restart the system, reported an error and could not enter the system.

An error occurred: Kernel panic-not syncing: Attempted to kill init!

Treatment method

Enter rescue rescue mode and copy the linked file to the deleted file system.

The steps are as follows:

1. Enter the BIOS settings when booting, and modify the BOOT boot sequence to start CD-ROM Drive on CD first.

2. Boot the CD after rebooting the system, enter the installation startup menu, and select "Rescue install system" rescue mode.

3. Go to the Rescue interface and select Continue

4. Mount the system under / mnt/sysimage, and select OK (if you want to go to the root environment, run the chroot / mnt/sysimage command, which is not required here)

5. Select the entry mode: shell enters the command line mode, fakd is the diagnostic mode, reboot restarts the computer, select shell here

6. Enter the shell command line, and the prompt is bash-4.1#

7. Do not execute chroot / mnt/sysimage, because the hard disk file system is in this directory. Just copy the soft connection from / lib64, as follows:

Bash-4.1# cd / lib64

Bash-4.1# cp-d libc.so.6 / mnt/sysimage/lib64/libc.so.6

Bash-4.1# reboot

And then it can return to normal.

The above are the reasons why CentOS can not log on to root and the solutions. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please 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: 275

*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

Servers

Wechat

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

12
Report