- 论坛徽章:
- 0
|
Solaris root密码恢复\r\n\r\n前提条件:cd-rom中要放入Solaris引导盘.\r\n• 到 OK 提示符下 \r\n1.通过按 Stop +A . \r\n2.SC上请输入break -> console -f 也可以进入。\r\n\r\n• 在OK 提示符下输入以下命令\r\n#ok boot cdrom -s \r\n• 挂启动盘到 /mnt \r\n可以通过df 命令查看,如果是看到d0这种盘符,用/usr/sbin/metastat d0可以找到对应的磁盘名称,如果系统无法登陆的话,可以自己手工将/dev/dsk/c?t?d?s?一个个的试mount,这要看人品了。如果是做了镜像的md盘两个盘都要mount上修改shadow文件.\r\n\r\n$ df -k / \r\nFilesystem kbytes used avail capacity Mounted on\r\n/dev/md/dsk/d0 20655025 8564261 11884214 42% /\r\n$ /usr/sbin/metastat d0 \r\nd0: Mirror\r\n Submirror 0: d10\r\n State: Okay \r\n Submirror 1: d20\r\n State: Okay \r\n Pass: 1\r\n Read option: roundrobin (default)\r\n Write option: parallel (default)\r\n Size: 41945472 blocks (20 GB)\r\n\r\nd10: Submirror of d0\r\n State: Okay \r\n Size: 41945472 blocks (20 GB)\r\n Stripe 0:\r\n Device Start Block Dbase State Reloc Hot Spare\r\n c0t0d0s0 0 No Okay Yes \r\n\r\n\r\nd20: Submirror of d0\r\n State: Okay \r\n Size: 41945472 blocks (20 GB)\r\n Stripe 0:\r\n Device Start Block Dbase State Reloc Hot Spare\r\n c0t1d0s0 0 No Okay Yes \r\n\r\n\r\nDevice Relocation Information:\r\nDevice Reloc Device ID\r\nc0t0d0 Yes id1,sd@SFUJITSU_MAW3147NCSUN146G000749C0CPN1____DAC0P7C0CPN1\r\nc0t1d0 Yes id1,sd@SFUJITSU_MAW3147NCSUN146G000749C0CP9E____DAC0P7C0CP9E\r\n$\r\n#mount /dev/dsk/c0t0d0s0 /mnt \r\n• 删除root口令信息,编辑/mnt/etc/shadow文件中的root行第二列,\r\n如下所示:\r\n root:IZg8892D8K3eI:14554:::::: \r\n # vi /mnt/etc/shadow\r\n• unmount 下 /mnt 再将第二块盘mount来修改shadow \r\n #umount /mnt\r\n• 重启主机进入多用户状态\r\n#reboot \r\n• 重启输入root直接回车就可以进系统了,密码是空的,然后重置root密码: \r\n#passwd\r\n\r\n\r\nenjoy it |
|