CentOS_7 Password Recovery / Single User mode

Password Recovery / Single User Mode (CentOS_7)

Steps:
1.) Reboot your server
2.) When it gets to your kernel at boot, hit "e" for edit mode
3.) Scroll down the page using the down arrow until you locate the line in the rescue script that has an 'ro'.
For me, it was toward the bottom, in the line starting with linux16 /vmlinuz-[the linux version number ending in].x86_64 root=dev/mapper/centos/root

4.) Change the ro to rw. Hit spacebar once. Type init=sysroot/bin/sh Leave a space between that and the next part "rd.lvm etc etc".
5.) Now you will be in single user mode. The shell prompt! -- looks
like :/#
6.) Hit Ctl-x
7.) Type chroot /sysroot
8.) Type passwd root
9.) Then appease SE Linux:
10.) Type touch /.autorelabel
11.) Type reboot
12.) Hit Enter




  • 23738 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

Linux - Setting a Static IP (Debian / Ubuntu Servers)

CyberOne Data - Linux Server(Debian / Ubuntu)Setting up a Static IPIntroduction:This howto help's...

How to Mount and Unmount a Partition in Linux

Mounting and Unmounting a Linux PartitionOnce you insert new hard disks into your system, you’ll...

Linux - Setting a Static IP (Redhat / CentOS Servers)

1. Configure eth0: [root@centos63 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0...

Linux - Setting Virtual (Multiple) IP's (Redhat / CentOS Servers)

Creating Virtual Interface and Assign Multiple IP Addresses Here I have an interface called...

How to change port number on CentOS 7

$sudo vi /etc/ssh/sshd_config *Edit the port number from 22 to 64322 $semanage port -a -t...