recover root password

Posted on 2003-03-21
Medium Priority
Last Modified: 2013-12-27

please excuse me here, I am new to this forum and new to solaris.

I recently aquired a sun computer running solaris 8, I have a shell account, but have no root access. How can I recover or reset the root password. The computer in question has no local CDROM device, I can only console into the computer.

is there a way to mount a CDROM from a different network drive and make it boot the system to do a recovery? or is there a script i can run local on the box that will break the root password?

Any help is greatly appreciated.

Question by:rootman103
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 14

Accepted Solution

chris_calabrese earned 300 total points
ID: 8181109
You need root to mount a CD over the net, so forget that.

Your best bet is to attack a CD-ROM drive and use one of Sun's recovery CD's.

Otherwise, troll security websites for easy-to-exploit security problems that may not have been patched.

Expert Comment

ID: 8181147
Normally, people recover with the CD but In your case,

If you take into the single user mode or some how If you are able to replace the /etc/password file's
root's second field with "hVKLnVHgtgWho" than your root password will be "a"

I suggest mount /etc to another unix box and try to change /etc/shadow file's root parameter.

Good luck
LVL 34

Expert Comment

ID: 8181666

I think your best bet is to take the drive that contains /etc out of the box and hook it up to another system running Solaris, then mount it somewhere on that system's filesystem, and alter the password value for root in /etc/shadow. Then put the drive back in the original system and bring it up.

You more-difficult alternatives are to boot using another machine on your network ("boot net" in the PROM monitor) or getting a suitable CD-ROM drive and hooking it up, then booting to the CD-ROM using the OS installation CD, breaking out of the install and altering /etc/shadow

If you're new to Solaris, none of these options are for the faint of heart - you need to be comfortable with UNIX filesystems, mount point, and adding/removing disks to/from a system. It is possible to trash the system by messing something up, so make sure you have a good backup. You may wish to engage locally available professional services if your skill-set is not up to this - be sure to take good notes so you can do it yourself in the future if you encounter a similar situation. Generally, once you've dealt with a situation like this, its not something you'll forget.

Expert Comment

ID: 8183381
You can mount the cdrom from another system on the network with a cdrom. You can use add_client_install to create a boot server for the problem system.

insert a solaris cd into the system that you want to share the cd from. In my example I am using the solaris 7 cd.

cd /cdrom/sol_7_599_sparc_sun_srvr/s0/Solaris_2.7/Tools

./add_install_client -e 8:0:20:99:88:77 -i myHostname sun4u

after the -e you enter the clients MAC address (you can get this from typing banner at the ok prompt)

after the -i you put the clients ip address (this is the ip address that the server will assign to the client)

You then specify the name that you want the server to provide to the client. I made my hostname "myHostname".

finally you specify the architecture (the Ultra10 is sun4u).

on the client type

boot net -s
after the client boots then mount your disk

mount /dev/dsk/c0t0d0s0 /mnt
vi /mnt/etc/shadow (now "x" the password away).

Author Comment

ID: 8242675
I must say thank you to all who responded, i chose this answer because I was able to get a CDROM drive and break root. I did like guerriero33t's answer, and will try that when I get a little better with the OS.



Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question