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

Docker basic commands (podman)

  Docker basic commands. Also use full for podman.   docker search <image-name> - search for image in docker-hub docker run <options> <image-name> - by default docker will run command foreground. For running background use -d option, - it interact with the container instead of just seeing the output, -- name option for giving friendly name when lunching container docker logs <friendly-name|container-id> - container standard err or standard out messages docker inspect <friendly-name|container-id> - more detailed information about running container docker ps - list all running docker containers docker run -p <host-port>:<container-port> - define ports you want to bind, when running conatiner d ocker port <friendly-name|container-id> - list port mappings or a specific port mapping for container -v <host-dir>:<container-dir> - mounts container-dir to host-dir docker s

Install Cisco AnyConnect on Ubuntu

Hi   In this post i will show how to  install Cisco AnyConnect on Ubuntu 19.10. First download soft from below link or from cisco.com site https://ftp.tugraz.at/tu-graz/vpn/ Once archive file  downloaded, extract it:     $ tar xvf anyconnect-predeploy-linux-64-3.1.14018-k9.tar.gz cd extracted folder:     $ cd anyconnect-3.1.14018/vpn/ install  Cisco AnyConnect using this command:     $ sudo ./vpn_install.sh After installing you can open application. If application not opening. You have to install libpangox-1.0-0 to solve problem:     $ sudo apt-get install libpangox-1.0-0 That's all.