rootman103
asked on
recover root password
Hi,
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.
Thanks
Rootman103
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.
Thanks
Rootman103
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
rootman,
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.
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.
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/S olaris_2.7 /Tools
./add_install_client -e 8:0:20:99:88:77 -i 192.168.1.2 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).
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
./add_install_client -e 8:0:20:99:88:77 -i 192.168.1.2 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).
ASKER
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.
Thanks
Rootman
Thanks
Rootman
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