Sponsored Content
Operating Systems Solaris Recovering Solaris 8 root password Post 302615801 by sunadmin on Friday 30th of March 2012 06:12:14 AM
Old 03-30-2012
Hi,
Follow the procedure to " Delete and Reset a Lost Root Password" --

1) Insert the Solaris[TM] 2.x Operating System CD-ROM into the
CD-ROM drive. For the Solaris 8 Operating System (Solaris 8 OS),
this CD-ROM is disk 1 of 2.

2) Once the CD-ROM is in the drive, perform a stop-a. This brings
the system down to the "ok" prompt.

3) From the "ok" prompt, perform a single-user boot from the Solaris OS CD-ROM.

ok boot cdrom -s

4) At the "#" prompt, determine which disk is the system's boot
disk (containing the root file system). There are several Sun
architectures and various configurations of systems when it
concerns a boot disk. As a general rule, most boot disks are
attached to controller 0 (c0). Usually, their SCSI target is
either 3 (t3) or 0 (t0). However, Sun machines are very flexible,
and the boot disk could be at a different location. If
you are not sure which disk is your boot disk, perform the
following steps to determine the location of the boot device:

a) # eeprom boot-device

The output might appear to be simple, such as "disk" or "disk1" or more complicated, such as a pathname

"/iommu/sbus/espdma@4,8400000/...../sd@3,0:a".

b) Make note of the boot-device. If the boot-device is a pathname, it is beyond the scope of this information to provide the location of the customized boot disk. However, for most configurations, finding the customized boot disk is an easy task. The "Format" command shows all available disks:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ST34321A cyl 8892 alt 2 hd 15 sec 63>
/pci@1f,0/pci@1,1/ide@3/dad@0,0
Specify disk (enter its number):

c) Enter <cntrl>d to exit format.

Now, you will have an idea what disks are on the system. Therefore, if the boot-device is "disk" and format shows "c0t0d0" (on some systems "c0t3d0") then that is the boot device. If boot-device shows "disk1" and format shows "c0t1d0," then that is the boot device. If format shows multiple disks, then based on what the "eeprom boot-device" command shows, the system's boot disk would be:

boot-device format

disk c0t0d0 or c0t3d0 (machine dependent)

disk1 c0t1d0

disk2 c0t2d0

disk3 c0t3d0 or c0t0d0 (machine dependent)

and so on ....

5) Because the system was not brought down gracefully (no root password means having to use the Stop-a keystroke to "crash" the system), you need to run "fsck" to clean the root partition (slice). The fsck also confirms that you selected the proper slice.

# fsck /dev/rdsk/cXtYd0s0

where the X and Y are determined by the previous procedure.

It is also possible to have a root partition which is not on slice 0 (s0), but, again, that is not a standard configuration.

The output of "fsck" looks like this:

** /dev/rdsk/c0t0d0s0
** last mounted on /
** Phase 1 .....
.....

The second line in the output of "fsck" ("** Last mounted on /")
confirms that this is the correct root filesystem partition. Answer "y" to any questions fsck asks. There shouldn't be too many items needing repair. If there are, there is a possibility of a corrupted root filesystem. After fsck is finished, mount the root partition:

# mount /dev/dsk/cXtYd0s0 /a

Again, X and Y are the same as for the fsck command.

For example:

# mount /dev/dsk/c0t0d0s0 /a

6) From the root prompt, set the proper TERM type command
(such as vt100, dtterm, sun, and so on) by entering this command:

# TERM=sun; export TERM

7) Use the VI text editor to edit the /etc/shadow file:

# vi /a/etc/shadow
This User Gave Thanks to sunadmin For This Post:
 

9 More Discussions You Might Find Interesting

1. Solaris

How to set Root password age limit in Solaris 9/10

Hi Friends, Can anyone tell me how can I set the password age limit for root user to 14 days....??? Also would like to add following for root password; min-alpha --- 4 min-other --- 1 min-length -- 6 min-diff ----- 3 How can I do these on command line....??? Regards, jumadhiya (7 Replies)
Discussion started by: jumadhiya
7 Replies

2. Solaris

Solaris root password

Bit of a strange problem I have never come across before.. I can log into the workstation going through the server as it is a trusted host but when I try and connect to the workstation through SSH or RSH directly it will not take the password, I changed the password when I logged in the machine... (5 Replies)
Discussion started by: Mr Pink
5 Replies

3. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

4. Solaris

install eclipse under solaris without root password?

hi, Ho can I install eclipse under solaris without root password? Thanks. peter (1 Reply)
Discussion started by: laopi
1 Replies

5. Solaris

Can't change root password in solaris express 11

How do I change root password in SolarisExpress 11? I used passwd while elevated to root and all it changes is the password of the user I am logged in, not te root password. (2 Replies)
Discussion started by: taltamir
2 Replies

6. Solaris

solaris 8 reset root password from OSX

Hello, I have two old Solaris machines $ uname -a SunOS unknown 5.8 Generic_117350-39 sun4u sparc SUNW,UltraAX-e2 unfortunately, it has been so long ago that i have used these that the root password has left my head... i can log into one of the machine as a normal user, but am unable to... (4 Replies)
Discussion started by: Norman Khine
4 Replies

7. Solaris

How recover the root password - Solaris 11?

Hello forum members, Please help me to recover the root password. I have had difficulties working with Solaris 11. The run-level equivalents single-user in Solaris 10, I can mount disk in one partition and edit files shadow/passwd. For example: {0} ok boot cdrom -s # mount... (4 Replies)
Discussion started by: Marcela Bueno
4 Replies

8. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

9. UNIX for Beginners Questions & Answers

I have forgot my root password. Solaris 10

hi everyone i have forgot my root password and i have other user to login. can i get the password without restarting the server as that cant be afforded. . it is a Sparc architecture 2U blade server. it is old server mounted and functional since 2009. what should be the modus oprandee. i am novice... (5 Replies)
Discussion started by: janakors
5 Replies
All times are GMT -4. The time now is 11:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy