1753272 Members
5065 Online
108792 Solutions
New Discussion юеВ

Re: unlock root in Linux

 
S.S.
Super Advisor

unlock root in Linux

Hi Experts,

How to unlock the root account in Linux?

Thank you!
7 REPLIES 7
Jean-Yves Picard
Trusted Contributor

Re: unlock root in Linux

Hello,

which Linux ? (redhat, suse, debian)

what do you mean by unlock ?

If you have root passwd, you can usually do a

su - root

If you don't have root passwd, only option is to boot from a CD and enter rescue mode.

Jean-Yves Picard
Matti_Kurkela
Honored Contributor

Re: unlock root in Linux

This is a Frequently Asked Question.

When needing answers to frequently asked questions, Google is your friend.

The first hit in a Google search with "redhat root password" points to a RedHat manual, which includes a step-by-step procedure:

http://www.lmgtfy.com/?q=redhat+root+password&l=1

MK
MK
S.S.
Super Advisor

Re: unlock root in Linux

Thanks for your suggestions.

i want to know how to enable or activate the root account in RedHat Linux if the root password is disabled/locked.

In HP-UX we usually go to MP prompt which can able to logon even though the root password is locked and go to sam; can re-activate the root password.

Thanks.
avizen9
Esteemed Contributor

Re: unlock root in Linux

Hello SS
better way is to reboot system in single user mode and update passwod file...
Kapil Jha
Honored Contributor

Re: unlock root in Linux

It actually depends upon the setup SS, I have seen customer where ur root passwd is locked even if u try it 3 times on console on HPUX.

What kind of password setup you have?

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Alan_152
Honored Contributor

Re: unlock root in Linux

For RedHat, this is the procedure for changing an unknown root password: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/step-guide/s1-q-and-a-root-passwd.html
Steven E. Protter
Exalted Contributor

Re: unlock root in Linux

Shalom,

You can boot the system with the power switch and then intervene on the boot prompt and go into single user mode. This must be done at console.

Press a key, down arrow to a kernel, edit the kernel boot line and add single to the end.

Enter, hit b to boot.

passwd

Then reboot to normal mode.

Or you can boot off media and null out the root password in /etc/shadow.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com