change root password in solaris 10

it is a silly, i change my solaris root password, after that i forgot it. even though it simple, but it quite challenge to change it.

well first of all, don't panic. all you have to do is, keep calm and relaxed. then prepare all what should be needed. ok here we are.

1. we need instalation cd. we need this because we have to go to single user mode
2. cable console. I need this, so i can console my sparc solaris, then get the serial command.
3. notebook. this is must, without this, i unable to conle the sparc
4. google. ask with this is more wise
5. sun keyboard. I need this, because i can interupt the server using OBP command. by pressing stop + A we reset the server

ok after all we need, here is the step
1. press stop + a, then choose reset
2. after solaris reset, insert the instalation disk. (i use solaris 10, since my solaris was solaris10)
3. after that, do stop +a again, and when ok prompt shown up, boot from cdrom
OK> boot cdrom -s
wait for a while, until it shows #
4. if it shows, check your disk, by using format

format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c1t0d0
/pci@400/pci@0/pci@8/scsi@0/sd@0,0
1. c1t1d0
/pci@400/pci@0/pci@8/scsi@0/sd@1,0



as you can see, we have 2 disks. so we have to mount them.
5. mount c1t0d0 first
mount /dev/dsk/c1t0d0s0 /a
6. after that, go to shadow file

TERM=vt100
export TERM
vi /a/etc/shadow

remove root encrypted password. it places after root coloms.
after remove it, save.
7. umount /a
8. after that, mount the second disk,
mount /dev/dsk/c1t1d0s0 /a
do step 6 and 7
9. after that , reboot server

init 6

10 and viola, we able to insert the system, using root account, with no password. don't forget to change password using command passwd root

Komentar

Postingan Populer