Wednesday, June 29, 2005

root password has lost root password

Re: root login problems
Posted By mkatiyar On Tuesday, June 21, 2005 at 11:00 PM


hi Dan,
Sending you the article.......
*****************************************************************************************
Regaining control of a Solaris x86 system where the root password has
been lost can be accomplished by the following steps. Note that any
savvy user can do this with the proper CD-ROM and diskette. Therefore,
of course, physical security of a system is important for machines
containing sensitive data.
Insert installation boot diskette and installation CD-ROM for Solaris x86.
Boot system from the installation floppy and select the CD-ROM as the
boot device.
Type "b -s" (instead of typing 1 or 2 from the menu) and it'll drop
you straight to a root shell, #, (and you'll be in single-user mode).
At the root prompt, #, key in the following commands, which will
create a directory called hdrive under the /tmp directory and then
mount the root hard drive partition under this temporary directory.

mkdir /tmp/hdrive
mount /dev/dsk/c0t0d0s0 /tmp/hdrive #SCSI; for ATAPI, omit "t0"
To use the vi editor, the TERM variable must be defined. Key in the
following commands.

TERM=at386
export TERM
Start vi (or some other editor) and load /tmp/hdrive/etc/shadow file:

vi /tmp/hdrive/etc/shadow
Change the first line of the shadow file that has the root entry to:

root::6445::::::
Write and quit the vi editor with the "!" override command:

:wq!
Halt the system, remove the floppy installation diskette, and reboot
the system:

halt
When system has rebooted from the hard drive, you can now log in from
the Console Login: as root with no password. Just hit enter for the
password.
After logging in as root, use the passwd command to change the root
password and secure the system.

[Thanks to Lynn R. Francis, Texas State Technical College]
*****************************************************************************************

0 Comments:

Post a Comment

<< Home