LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 11-01-2017, 03:37 PM   #1
ghurty
LQ Newbie
 
Registered: Dec 2010
Posts: 7

Rep: Reputation: 0
Reset root password (alternate method)


I have a box that I dont have the root password for.
I tried the trick to edit the grub menu, but when I go to edit it, the screen charachters are garbled and I cant see/do anything. Any other time the screen works. Is there a different method to reset the password? Here is a link to the image https://imgur.com/FXIOk9x

Last edited by ghurty; 11-01-2017 at 03:43 PM.
 
Old 11-01-2017, 05:42 PM   #2
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 222

Rep: Reputation: 35
I found this, and it may be the method your mentioning. In general, this should work, imho.

Question 1: Does the system boot at all?

Question 2: Can you boot from a live distro (eg. on CD/DVD or USB stick)?
If this is possible, the method mentioned also requires to mount your root partition and execute the '/bin/bash', passwd as root user.
So instead of: "mount -rw -o remount /", you need to do something like "mkdir /mnt/the_root && mount -rw /dev/sda1 /mnt/the_root && chroot /mnt/the_root" (I'm not sure about the 'chroot' right now, also the /dev/sda1 might be different in your case)
 
Old 11-08-2017, 02:42 PM   #3
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Boot from live CD or from any distro rescue CD, mount system and do what you want with grub and rest of system.

(Ah, sorry, "traene" already said that)

Last edited by voleg; 11-08-2017 at 02:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xen VM Login Access Reset or Alternate Method willinit Linux - Software 1 02-12-2017 11:00 PM
[SOLVED] centos 5.5 need to reset gui password not the root password jmiller Linux - Newbie 9 01-10-2015 05:40 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
reset root password kapslock Debian 14 07-27-2006 07:08 AM
Reset Root password sdsouza Linux - Software 5 11-12-2003 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration