Avatar of forums_mp
forums_mp
 asked on

change root password - Red Hat 5.5

To change the root password.  Before the countdown completes during the boot process, I select espace.

From there depressed 'e' key twice. Highlighted the GRUB entry (kernel) for the linux install.   Typed single, depressed enter then b for boot

When I try to change the root password as follows:
[root@localhost /]# passwd root

I'm never prompted to change the password.  The command prompt returns immediately.  IOW:

[root@localhost /]# passwd root
[root@localhost /]

The reason I need to do this is an individual changed root password doing the same steps above yesterday but 'forgot' the root password.  So now I'm trying to change it to something we could potentially all remember.

What's the solution?
Unix OS

Avatar of undefined
Last Comment
farzanj

8/22/2022 - Mon
farzanj

Generally only passwd command should work in the single user mode or run level 1.

passwd

Open in new window


In case it doesn't work, you can still do it in single user mode or run level 1.

Issue command

grub-md5-crypt

Open in new window


It will ask you password twice and then it would give you a hash for your password.
Open the file /etc/shadow

vi /etc/shadow

Open in new window

Find the entry for root and paste the above has there.
forums_mp

ASKER
Hmnn..this is frustrating..
I'm getting a message


Followed your instruction above but now I'm met with:

su root
unix_chkpwd[1318]: check pass; user unknown
Password: { i enter the password here ]
unix_chkpwd[1318]: check pass; user unknown
unix_chkpwd[1318]: password check failed for user (root)

Not sure why it appears my changes (per your instruction) didn't stick
SOLUTION
farzanj

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
forums_mp

ASKER
oops..lets try again.   After i did what you instructed.. I logged in normally.. I tried installing a package but  I need root admin to do so....  At that point I typed su root and got the errors.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
forums_mp

ASKER
this mess
unix_chkpwd[1318]: check pass; user unknown
Password: { i enter the password here ]
unix_chkpwd[1318]: check pass; user unknown
unix_chkpwd[1318]: password check failed for user (root)


I'm wondering if somewhere along the way..i messed up root.  The root string was very long.. but I ended up just putting in only the hash value that was given on the comand prompt in the shadow file.

Again I could log in as 'me'.   I need root access to do stuf... the genius that used the box yesterday reset the root passord but forgot it... so now I'm trying to reset it by start with GRUB

then when I type passwd .. it doesnt prompt me to change my password.. your option grub-md5-crypt  at least allows me to enter a password..  from there i edited the shadow file with vi and stuck the has key at root (i overwrote everything that was there .. which may have been a mistake given the hash key is nto as long as what was there before)
forums_mp

ASKER
found a solution.. i blew away the entire root hash....life's good again
farzanj

After changing your password, did you go to run level 3?

init 3

Open in new window


Issue this command please

grep root /etc/shadow

Open in new window

Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
forums_mp

ASKER
I have another question for you.... My linux use dates back 5 years so I'm slowing getting accliamated again.

given:

[root@localhost VirtualBox]# rpm -ql xorg-x11-drv-vmware-10.16.7-2.1.el6.x86_64.rpm
package xorg-x11-drv-vmware-10.16.7-2.1.el6.x86_64.rpm is not installed
[root@localhost VirtualBox]# yum install xorg-x11-drv-vmware-10.16.7-2.1.el6.x86_64.rpm
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package xorg-x11-drv-vmware-10.16.7-2.1.el6.x86_64.rpm available.
Error: Nothing to do

So there's a vmware rpm, yet yum says there's no such package.  How can I get the location of where the rpm exists?  I did command line searches in
/usr
/opt

but keep coming up short?   Purchased RHEL a few months ago... I suspect its time to register
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.