Re: Recoverding lost password in Solaris
From: Juhan Leemet (juhan_at_logicognosis.com)
Date: 06/30/04
- Previous message: Juhan Leemet: "Re: drive not available"
- In reply to: Gavin Maltby: "Re: Recoverding lost password in Solaris"
- Next in thread: Juhan Leemet: "Re: Recoverding lost password in Solaris"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Jun 2004 21:14:58 -0200
On Tue, 29 Jun 2004 18:13:26 +0100, Gavin Maltby wrote:
> Shashank Khanvilkar wrote:
>> Hi,
>> I need to recover a lost password for the solaris machine. I am
>> following the usual steps of booting it using a cdrom and then mounting
>> the dev/dsk/c0t0d0s0 on /a and manually removing the passwd from the
>> shadow file.
>> However i would like to know, how do we find out the exact device to be
>> mounted. There were so many of them (cntndnsn).. Is there any standard
>> way to find this out?
>
> Once booted from cd or net -s, 'eeprom | grep boot-device'. Now
> 'mount /devices/<that physical path to disk>' possibly having
> to substitute 'sd' or 'ssd' for 'disk'. That assumes that
> boot-device in obp is the one you usually boot from and
> want to recover (will be unless you have several different
> installations on one machine).
I find all that stuff bewildering. Wouldn't it be enough to read off the
boot device from eeprom, and then do a prtvtoc of /dev/rdsk/<bootdevice>,
and look for Tag=2 (for / root). Then mount that partition on /a and do
whatever surgery is required? You could confirm it's the right device by
looking for /a/etc/vfstab, which will confirm all your mount points.
Though I must be missing something, because if OP can boot the system and
do fsck (he's running as root here!), he should be able to do the same
surgery at that point, I would have thought? Might have to remount r/w?
Ah, OK, it's a semi-retorical question. That's fine. I like a review.
You don't explicitly say, but I assume you're trying to recover the root
password. Other passwords might actually be coming from NIS, NIS+, or LDAP.
In another post you say that you're having trouble updating the shadow
file. Whichever editor you're using should be able to tell whether the
write is completing successfully? You could also "more" the file after?
Saaay... You don't by any chance have root mirroring on this thing, do
you? What's the chance that you're editing the busted side of a mirror?
System is coming up and using the other (non-busted) side of the mirror?
Looking at your /a/etc/vfstab should clear that up, is / an md device?
-- Juhan Leemet Logicognosis, Inc.
- Previous message: Juhan Leemet: "Re: drive not available"
- In reply to: Gavin Maltby: "Re: Recoverding lost password in Solaris"
- Next in thread: Juhan Leemet: "Re: Recoverding lost password in Solaris"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|