Skip to main content

How To Reset root pass in RHEL 7 & CentOS 7

   
    Hi every one in this post i will show you, how to reset  forgot root password in RHEL_7 & CentOS_7 . Short record of the prosses i will post later.
    In previous post i used "init=/bin/sh" for resetting but now i will show another way of resetting root pass. Let's begin
     First in grub loader menu tab  'e'  enter edit boot options from here go to line beginig with 'linux16' in this line delete words 'rhgb', 'quite' and add 
'rd.break' press 'Ctrl+x'  and we boot in emergency mode where system mount to "sysroot" . Enter below commands:
  1. mount -o remount,rw /sysroot       #remount as read write /sysroot
  2. chroot /sysroot      #change root folder to sysroot
  3. passwd   #for resetting root password
  4. touch /.autorelabel         #for selinux  
  5. exit    #twice enter exit
    After above steps, you will success reset root password. 

Comments

Popular posts from this blog

Reset root pass in ESXi 5.5

    In this post i will show how to reset root password in ESXi 5.5. For this first we need any bootable linux distributor. In my example i used Ubuntu 16.04.     Boot from Ubuntu disk. Select try Ubuntu, wait for loading. After full loading open Terminal. Type fdisk -l for list all partitions hypervisor/system image is located on the first 250 MB partition (/dev/sda5) which contains the state.tgz file. Mount /dev/sda5 to /mnt sudo -s mount /dev/sda5 /mnt. Go to the /mnt cd /mnt . Copy state.tgz to /tmp folder cp state.tgz /tmp , cd /tmp. Unarchive state.tgz tar xzf state.tgz then   tar xzf local.tgz Go to the /etc directory in /tmp folder  cd etc/ . For deleting resetting password open shadow file with nano shadow  delete the password hash of ESXi root account. Close nano editor. Re add etc/ folder to local.tgz : tar czf local.tgz etc after it readd local.tgz to state.tgz: tar czf state.tgz local.tgz . Copy state.tgz mnt/ folder: cp state.tgz /mnt/ . umount /mnt 

Service Hosting - KVM documentation

Host System Requirements: Minimum host system requirements 6 GB free disk space. 2 GB RAM. Recommended system requirements One core or thread for each virtualized CPU and one for the host. 2 GB of RAM, plus additional RAM for virtual machines. 6 GB disk space for the host, plus the required disk space for the virtual machine(s). KVM Hypervisor Requirements: an Intel processor with the Intel VT-x and Intel 64 virtualization extensions for x86-based systems; or an AMD processor with the AMD-V and the AMD64 virtualization extensions. Installing the Virtualization Packages: To use virtualization on OL7, at minimum, you need to install the following packages: # yum install qemu-kvm libvirt qemu-kvm: This package provides the user-level KVM emulator and facilitates communication between hosts and guest virtual machines. qemu-img: This package provides disk management for guest virtual machines. The qemu-img package is installed as a dependency of the qemu-kvm package. libvirt: