Password recovery trick not working on CentOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

I remember back in the days, there was a neat trick to recover a lost
root password, or more exactly, redefine a new password for root.

1. In the bootloader, boot the system with the 'init=/bin/bash' kernel
argument.

2. Remount the root partition in read-write mode:

  # mount -o remount,rw /

3. Set the password for root:

  # passwd

4. Remount the root partition in read-only mode:

  # mount -o remount,ro /

5. Switch off the computer.

I tried this out of curiosity on a CentOS 7 sandbox machine, and this
doesn't seem to work anymore. I can boot to a 'bash' console and set the
password OK. But this password doesn't seem to work on the subsequent
normal boot.

Anybody knows why this is so?

Cheers,

Niki

-- 
Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Site : https://www.microlinux.fr
Blog : https://blog.microlinux.fr
Mail : info@xxxxxxxxxxxxx
Tél. : 04 66 63 10 32
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]


  Powered by Linux