Here we tend to area unit seeing the way to reset the foundation watchword of a Centos seven server victimisation single-user mode. the strategy is especially applicable for dedicated servers since there area unit choices accessible within the board to reset the password for a VPS victimisation any virtualization platform.
Reset RooT password Single User Mode on CentOs 7
- Login to the IPMI and start the Java Console.
- Reboot the server and in the grub menu, you need to select the option to edit by pressing 'e'.
- There you can see some texts and you can find the following words in the 16th line:
ro rd.lvm. lv=centos- Please remove 'ro' and add the following instead:
rw init=/sysroot/bin/shso it will look likerw init=/sysroot/bin/sh rd.lvm. lv=centos- Then press ctrl+x to start the single user mode.
- There you will get a command prompt. Please type the following command there:
#chroot /sysroot- Then reset the root password using passwd command:
#passwd root- Update SELinux information by using the following command:
#touch /.autorelabel- Then exit and reboot the system using the following:
#exit
#reboot- Once rebooted, you can log in to the server using the newly set password.
- centos single user mode
- 0 Users Found This Useful