INFORMATICS

The Best

Resest root password on CentOS 7

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Resest root password on CentOS 7

Start server, at the boot menu press e to edit the selected item

Finde the line with "ro"

remove ro and type rw init=/sysroot/bin/sh

Save changes -  CTRL + X

in single user mode type

chroot /sysroot

You can now change the password command:

passwd root

After creating the password, update SELinux parameters:

touch /.autorelabel

 

Search