The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> UNIX Help
|
Recover root passwd - without the CDs: Solaris9/SunOS5.9
Discuss Recover root passwd - without the CDs: Solaris9/SunOS5.9 in the UNIX Help forum on Dev Shed. Recover root passwd - without the CDs: Solaris9/SunOS5.9 UNIX Help forum discussing the Unix Operating System and all variants including Irix, Solarix, and AIX. Unix was designed as a true multi-user operating system.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 29th, 2003, 08:53 AM
|
 |
Moderator Emeritus
|
|
Join Date: Feb 2002
Location: Scottsdale, AZ
|
|
|
Recover root passwd - without the CDs: Solaris9/SunOS5.9
How can one recover or change root's passwd without having the installation CD's on Solaris?
Is it even possible?
|

May 30th, 2003, 06:24 PM
|
 |
Banned ;)
|
|
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
|
|
Can't you boot to single-user mode from the hard disk. IIRC, at the boot prompt, you can type something like this:
OK boot /dev/dsk/c0t0d0s0 -s
-s tells it to boot in single user mode and /dev/dsk/c0t0d0s0 is assumed to be your boot partition (alter it to match your setup).
You may need to mount other partitions manually, depending on where vipw is (assuming that you're using vipw to edit your password). vipw is on /usr/sbin for Linux and I'm assuming that it is somewhere similar on Solaris. You might want to execute cat /etc/fstab to see the list of partitions and how each one should be mounted.
After that, u can edit the passwd file with vipw, blank out the password field and then reboot into regular mode.
Then log in as root with blank password. Immediately change your root password after logging in.
Hope this helps 
|

June 2nd, 2003, 12:45 PM
|
 |
Moderator Emeritus
|
|
Join Date: Feb 2002
Location: Scottsdale, AZ
|
|
|
I'll give it a shot - thanks!
|

June 10th, 2003, 11:39 AM
|
 |
Moderator Emeritus
|
|
Join Date: Feb 2002
Location: Scottsdale, AZ
|
|
OK - root has been recovered... oh, and I got a copy of the Solaris CD 1 for this after all...
Here's how I did it: - Press 'Stop A' simultaneously on the Sun Keyboard
- type 'sync' - this restarts the Blade, and protects the drives from becoming corrupted.
- After it restarts, Stop A again, then type 'boot cdrom -s'. This boots into single-user mode.
- mount /dev/dsk/c0t0d0s0 /a
- TERM=sun; export TERM
- vi /a/etc/shadow/
- Use vi to delete the password for root
- Save shadow in vi: type ": wq!"
- cd /
- umount /a
- cd /sbin
- init 6 (this reboots you - log in as root, open up a terminal, type passwd, reset your passwd, and you're done!)
Hope this helps someone else out there if they ever run into this situation... 
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|