root password | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

root password

Shell Programming and Scripting


Tags
linux

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-20-2002
silver40 silver40 is offline
Registered User
 
Join Date: Mar 2002
Last Activity: 5 April 2002, 9:33 AM EST
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
root password

For some reason my root password is not working ... and I have no idea why

I can't log in as root and i cant su to root


Could anyone tell me how to fix this ?

running Red Hat Linux
Sponsored Links
    #2  
Old 03-20-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
 
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 4 Times in 4 Posts
reboot and break in

There are two paths here.

One is to reboot and get back into single user mode, which doesn't require a password on 99% of UNIX flavors, when you get to the prompt type:

passwd root

That should let you change the root passwd.

The second path is not as easy. You will either need to make an alternate boot disk or reload your OS.

Also, you can search this site for others who have had problems with losing the root password. Search for "root login problems" or "no root password".

Here is one link.

I neede help!!!



Maybe you will get lucky and can reboot to single user mode and change the password!

Let me know how this works out!

Good Luck.
Sponsored Links
    #3  
Old 03-20-2002
silver40 silver40 is offline
Registered User
 
Join Date: Mar 2002
Last Activity: 5 April 2002, 9:33 AM EST
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
ok i rebooted the machine and changed the password in single user mode. it worked perfectly.

However my problem is a little more extensive than this (as usual)

I have the same root passwd on all 4 of my servers. All running Red Hat Linux.

For some odd reason the root passwd will not work on any of my servers. It looks like someone manually changed the root passwd on all my servers (sounds like a hacker).

My question is there a way to change the root passwd on all of my servers without having to reboot every single one of them or creating boot disks ?

The reason i dont want to reboot these servers is because they are production web servers.
    #4  
Old 03-20-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
 
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 4 Times in 4 Posts
rlogin or rcp

If you have .rhosts files established on each of the other servers, you should be able to execute. rlogin

rlogin systemname -l root

If you have the exact same passwd files, you can use rcp.

rcp mycurrentbox:/etc/passwd theotherbox:/etc/passwd

Then you can login over there as well. If they are not the same you can do this anyway and then restore you password from a backup with out interrupting the users.



If not you may need to reboot them as well.

keep me updated.
Sponsored Links
    #5  
Old 03-20-2002
silver40 silver40 is offline
Registered User
 
Join Date: Mar 2002
Last Activity: 5 April 2002, 9:33 AM EST
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
ok,

here is what i did on my local server.

i added a line to my .rhost file in the root home directory :

remote.server.abc root

i set the file permissions to 600


then im using the rlogin command like this :

rlogin -l root remote.server.abc

it wont do anything, it just hangs there


do i need to edit the .rhost file in my remote server, also ??

If so, how will I be able to if the .rhost file has root permissions and i cant login as root ?

i think the .rhosts files have been created for other servers but not for my situation.

i also tried the remote copy command 'rcp' but that seems to be just hanging there also.


My local server is behind a firewall and my remote server is outside the firewall .... could that be an issue ???

btw, thanks for you help.
Sponsored Links
    #6  
Old 03-20-2002
Kelam_Magnus's Avatar
Kelam_Magnus Kelam_Magnus is offline Forum Advisor  
Registered User
 
Join Date: Aug 2001
Last Activity: 18 April 2013, 3:03 PM EDT
Location: San Antonio, TX,
Posts: 1,070
Thanks: 0
Thanked 4 Times in 4 Posts
You do need to have a .rhosts on both/all systems involved.

Also your format is wrong for the rlogin command.

rlogin hostname -l root


If this doesn't work you will have to schedule downtime to reboot.



Sponsored Links
    #7  
Old 03-20-2002
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
 
Join Date: Nov 2001
Last Activity: 23 October 2011, 10:07 PM EDT
Location: Brisbane, Australia
Posts: 509
Thanks: 7
Thanked 0 Times in 0 Posts
Also (from memory) make sure that your default file (/etc/auth/system/default) still exists.

Pretty sure that's it, otheruwise you won't be able to rcmd the other server
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Lost Root Password on VXVM Encapsulated Root Disk sunnyd76 Solaris 1 03-09-2012 09:16 PM
Solaris 8 - Asks for current root password when trying to change root password. tferrazz Solaris 8 04-07-2009 02:28 PM
how to change root password using shell script with standard password kurva Shell Programming and Scripting 2 02-25-2009 01:35 AM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 05:24 AM
Lost root password / Can't login as root Perderabo Answers to Frequently Asked Questions 0 06-22-2004 07:40 PM



All times are GMT -4. The time now is 07:39 PM.