The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with Lost Root Password JoeJohnSmith UNIX for Advanced & Expert Users 3 05-18-2006 10:26 AM
lost root password in AIX Welfaric AIX 4 02-15-2006 03:55 AM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 02:24 AM
Lost root password / Can't login as root Perderabo Answers to Frequently Asked Questions 0 06-22-2004 04:40 PM
Lost Root Password GlockCW UNIX for Advanced & Expert Users 2 06-21-2004 02:33 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-07-2003
Registered User
 

Join Date: Oct 2001
Posts: 61
Stumble this Post!
Root Password Lost !!!

I've forgotten root password on one of Solaris machines, i searched in forumes to find a similar case but there's no proceudre here to reinintialize root password, cause most of related commands & even single user mode needs root password that i don't have.
Any solution would be helpful.
--rgrds,
nikk
Forum Sponsor
  #2 (permalink)  
Old 01-07-2003
merlin
Guest
 

Posts: n/a
Stumble this Post!
I'm pretty sure if you boot into single user mode from the CD then that should help you.
  #3 (permalink)  
Old 01-07-2003
BSeanD's Avatar
Registered User
 

Join Date: Aug 2002
Location: Melbourne, Australia
Posts: 127
Stumble this Post!
Boot to single user mode and recover it from there.
  #4 (permalink)  
Old 01-07-2003
minazk
Guest
 

Posts: n/a
Stumble this Post!
See this
  #5 (permalink)  
Old 01-07-2003
Registered User
 

Join Date: Apr 2002
Location: Argentine - that better than to eat meat and to drink wine (both Argentineans)?.
Posts: 132
Stumble this Post!
Step by Step

You need to use:

a) A console, or

connect a PC/notebook in the serial port using the apropiate serial cable:

1) If the Serial console use an RJ45 as Serial conector
use the cable provided with the machine, or
if you use cisco switches use the terminal DB9
(for the PC an the cisco cable to serial 1)
2) If the Serial console use an DB25 connector as
Serial conector use the cable provided with the
machine, or an HP Serial cable DB9 to DB25

Because the most common case is to use a serial connection
the rest of the post is


b) Open an Hyperterminal/SecureCRT or whatever and
open a connection via COM1 (9600-8-N-1-None) using vt100
emulation.

c) Send a shift-break to halt the system

d) at the ok prompt
OK boot cdrom -s

e) After boot
TERM=vt100
export TERM
mkdir /tmp/d0
mount /dev/dsk/c0t0d0s0 /tmp/d0
cd /tmp/d0/etc

f) Leave blank the second field of the /etc/passwd
vi /tmp/d0/etc/passwd
( delete the x an save :wq! )

g) reboot

h) when prompt for root passwd press enter

i) change root passwd
passwd.


Note: If possible that you need to run an fsck
example: fsck -F <FSTYPE> -y /dev/rdsk/c0t0d0s0
FSTYPE: usually ufs

Note 2: If you use Solstice Disksuite in order to mirror
boot disk, you need to copy the modified /etc/passwd
to the other partition. I.E.:

f.1) mkdir /tmp/d1
mount /dev/dsk/c0t1d0s0 /tmp/d1
cp -p /tmp/d0/etc/passwd /tmp/d1/etc/passwd


Last edited by hugo_perez; 01-14-2003 at 09:37 AM.
  #6 (permalink)  
Old 01-07-2003
Registered User
 

Join Date: Jun 2002
Location: Amsterdam (Netherlands)
Posts: 142
Stumble this Post!
depends on solaris/SunOS level

On with solaris level are you working on.

Since version 2.6 solaris ask you for enter the root password when you boot single user, so this will not help you.

the only way, as far i see is to boot from cdrom.
stop the installation fase and mount the root-file-system.
make a copy of the password file, reset the password field in the password file for user root.

reboot your system, set the password again.
  #7 (permalink)  
Old 01-07-2003
Registered User
 

Join Date: Apr 2002
Location: Argentine - that better than to eat meat and to drink wine (both Argentineans)?.
Posts: 132
Stumble this Post!
I have a box with Solaris 2.6 that work different

I have a box with Solaris 2.6 that work different,
never prompt for root password when I boot
from the boot prompt with boot cdrom -s.

The only password that I supply in same boxes
are the Firmware password if it's established.

Regards. Hugo
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0