1752734 Members
5473 Online
108789 Solutions
New Discussion юеВ

Re: no root password

 
SOLVED
Go to solution
S.S.
Super Advisor

no root password

Hi Experts,
I am new to Linux. Kindly help me for my following query.

We have a Linux server in which all of the root passwords are with my Manager. When i have asked him for one of Linux server he said that there is no root password for that server.

The only way to login to that server is with the oracle user account.

Kindly advise me by step by step to trouble the problem.
4 REPLIES 4
Kapil Jha
Honored Contributor

Re: no root password

boot from CD in linux rescue.
and change the root passwd.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Durvesh Mendhekar
Regular Advisor
Solution

Re: no root password

Hi,

Follow the below steps to change the password of root.

At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.

You are presented with a prompt that looks similar to the following:

grub append> ro root=LABEL=/


Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

ro root=LABEL=/ single


Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

sh-2.05b#


You can now change the root password by typing

passwd root


You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.


Durvesh
Horia Chirculescu
Honored Contributor

Re: no root password

Hello,

You could use a "rescue disk". Some of the linux distributions have this disc included in the standard distribution (check the installation media - you must write a floppy or CD from that image) or you can use some of the rescue software developped by third parties found on the internet. Here it is such a program:

http://www.sysresccd.org/Quick-start-guide_EN

If you are able to mount your /root partition, you can go to /etc/shadow and blank the password for root (using vi).

sample:

root:$1$WsA0no$B9dy.zg5WAiQSz7ssZ3Yu1:14631:0:99999:7:::

to look like this:

root::14631:0:99999:7:::

Leave vi using :wq then issue a "sync" command just to be sure and then reboot the system normally (whithout booting the rescue media).

You should log in without password. First thing to do will be to change that null password if your system is on-line.

Horia.
Best regards from Romania,
Horia.
S.S.
Super Advisor

Re: no root password

Thank you!