Passwd,shadow files deleted and abort sequence disabled

Hi all..

I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode.
But, I forgot to enable the abort key-sequence which I earlier disabled.
Stuck!
One of my gurus told I had to 'power-recycle'.. I could not understand.:o

The only idea I have is to 'Stop+d' after physically shutting down and then switching-on the machine. But, I don't know its consequences.
Any help here?

I don't know SunOS all too well, but you could always put another disk in (if CD-ROM boot or network PXE boot is disabled), boot from there (OS has to be installed properly) and then mount your disk and move the files back.

We have even a FAQ dealing with exactly this proposition. It is good style to first search other threads here, especially the FAQs, before opening a thread of your own.

I hope this helps.

bakunin

I went through all of the FAQs.. but found no solution to my problem
The main point here is I left 'abort-sequence' disabled. I cannot boot from CD/net.
FYI.. it doesn't have a system console.

A powercycle will not fix your problem. You need to boot in rescue mode and mv /etc/password and /etc/shadow back where they belong.

Have you got a Solaris 10 installation CDROM or DVD?

Can you get to the OpenBoot PROM (OBP)?

But all that needs a stop-a sequence from the SUN keyboard. I forgot to enable the sequence before moving the files.

What machine is it? Maybe you will be lucky enough to have ALOM or ILOM configured... You can also connect to serial console and send break from there.

The following should work wether the break-sequence is disabled or not:

  • Take an identical system. Make sure you can boot/install it and install the OS to a new disk.
  • Take out this disk and connect it to the system you want to revive as the first harddisk. You may have to disconnect your faulty disk and attach it differently to prevent the system to attempt booting from there. Boot the normally from this disk.
  • Attach the original disk to the system, mount its file systems and make the necessary changes to make it bootable again.
  • Shut down, remove the new disk and put the revived disk into its place again.

This generic approach works on virtually every OS i have encountered so far. If this doesn't work then please tell us why and what exact problem you encountered.

I hope this helps.

bakunin

Your query is already answered by others here, I am sure your onsite guy or someone senior should have access to that console or a engineer would be in datacenter with that sun keyboard.

Get them to do Stop+a, you get to single usermode, copy over the files. and reset the password using the CD/DVD rom

/tmp gets cleared when you do a reboot, you should have checked it first :slight_smile:

  1. This is not a server in a remote datacentre. Its my brother's box. If that were my client's box.. I would have received my bye-bye letter by now. (Believe me, when I explained this scenario to my senior, he was like :eek: as if I had done the unthinkable.)
  2. It doesn't have a console.
  3. I disabled stop+a keystroke. That means, I cannot get the ok> prompt.
    But, my sa200 doc says that stop+a, even if disabled, will work during booting. Will test it once I get home.
  4. The /tmp dir is not a tmpfs. It is a part of /.. hence will be avaialable across reboots.

I'm afraid you are also mistaken here. As a SVR4 Unix, Solaris is removing everything under the /tmp directory at boot time. On Solaris 10 and newer, this is done by the svc:system/rmtmpfiles:default service which is enabled by default. Older release had an rc file for the same purpose.

1 Like