feiniao222 发表于 2011-10-30 13:12

求助!root忘记密码了,网上的方法用过了还是不行。很着急

本帖最后由 feiniao222 于 2011-10-30 13:20 编辑

小弟的v240机器信息如下:

1.format 信息如下,从信息上看不出是否已经作了镜像。似乎根盘时c1t0d0s0,不知道对不对。

# echo | format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@0,0
       1. c1t1d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
          /pci@1c,600000/scsi@2/sd@1,0
       2. c1t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@1c,600000/scsi@2/sd@2,0
       3. c1t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
          /pci@1c,600000/scsi@2/sd@3,0
Specify disk (enter its number): Specify disk (enter its number):

2.命令df -k显示的信息如下,好像看不到根盘信息。

# df -k
Filesystem            kbytes    used   avail capacityMounted on
/pci@1e,600000/ide@d/cdrom@0,0:b
                      174639157917       0   100%    /
/devices                   0       0       0   0%    /devices
ctfs                     0       0       0   0%    /system/contract
proc                     0       0       0   0%    /proc
mnttab                     0       0       0   0%    /etc/mnttab
swap               4006200   336 4005864   1%    /etc/svc/volatile
objfs                      0       0       0   0%    /system/object
swap               4006416   552 4005864   1%    /tmp
/tmp/dev             4006416   552 4005864   1%    /dev
fd                         0       0       0   0%    /dev/fd
/devices/pci@1e,600000/ide@d/sd@0,0:a
                     3210366 3210366       0   100%    /cdrom
/cdrom/Solaris_10/Tools/Boot/usr
                     3210366 3210366       0   100%    /usr
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1
                      174639157917       0   100%    /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                      174639157917       0   100%    /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
swap               4005864       0 4005864   0%    /tmp/root/var/run


3./dev/dsk/ 目录下,有如下信息:

# cd dev/dsk
# ls
c0t0d0s0c0t0d0s5c1t0d0s2c1t0d0s7c1t1d0s4c1t2d0s1c1t2d0s6c1t3d0s3
c0t0d0s1c0t0d0s6c1t0d0s3c1t1d0s0c1t1d0s5c1t2d0s2c1t2d0s7c1t3d0s4
c0t0d0s2c0t0d0s7c1t0d0s4c1t1d0s1c1t1d0s6c1t2d0s3c1t3d0s0c1t3d0s5
c0t0d0s3c1t0d0s0c1t0d0s5c1t1d0s2c1t1d0s7c1t2d0s4c1t3d0s1c1t3d0s6
c0t0d0s4c1t0d0s1c1t0d0s6c1t1d0s3c1t2d0s0c1t2d0s5c1t3d0s2c1t3d0s7

3. /etc/shadow文件信息如下,我已经挂在c1t0d0s0后更改了root密码为空。

# cat shadow
root:NP:6445::::::
daemon:NP:6445::::::
bin:NP:6445::::::
sys:NP:6445::::::
adm:NP:6445::::::
lp:NP:6445::::::
uucp:NP:6445::::::
nuucp:NP:6445::::::
smmsp:NP:6445::::::
listen:*LK*:::::::
gdm:*LK*:::::::
webservd:*LK*:::::::
postgres:NP:::::::
svctag:*LK*:6445::::::
nobody:*LK*:6445::::::
noaccess:*LK*:6445::::::
nobody4:*LK*:6445::::::


4. /etc/passwd的信息如下,我没有做任何修改。
# cat passwd
root:x:0:0:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp:x:25:25:SendMail Message Submission Program:/:
listen:x:37:4:Network Admin:/usr/net/nls:
gdm:x:50:50:GDM Reserved UID:/:
webservd:x:80:80:WebServer Reserved UID:/:
postgres:x:90:90:PostgreSQL Reserved UID:/:/usr/bin/pfksh
svctag:x:95:12:Service Tag UID:/:
nobody:x:60001:60001:NFS Anonymous Access User:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x NFS Anonymous Access User:/:

5.以下reboot是重启的信息。

# reboot
syncing file systems... done
rebooting...

SC Alert: Host System has Reset
Probing system devices
Probing memory
Probing I/O buses

Sun Fire V240, No Keyboard
Copyright 2005 Sun Microsystems, Inc.All rights reserved.
OpenBoot 4.18.5, 4096 MB memory installed, Serial #66583449.
Ethernet address 0:3:ba:f7:fb:99, Host ID: 83f7fb99.



Rebooting with command: boot                                          
Boot device: vx-rootdiskFile and args:
SunOS Release 5.9 Version Generic_122300-13 64-bit
Copyright 1983-2003 Sun Microsystems, Inc.All rights reserved.
Use is subject to license terms.
Hardware watchdog enabled
Configuring ATM interfaces:
VxVM sysboot INFO V-5-2-3390 Starting restore daemon...
VxVM sysboot INFO V-5-2-3409 starting in boot mode...
NOTICE: VxVM vxdmp V-5-0-34 added disk array DISKS, datype = Disk

configuring IPv4 interfaces: bge0.
Hostname: yfvtdm10
VxVMINFO V-5-2-3247 starting special volumes ( swapvol rootvol var opt ford u c3p10 )...
VxVM vxvm-startup2 INFO V-5-2-503 VxVM general startup...
The system is coming up.Please wait.
/dev/vx/rdsk/bootdg/opt is clean
starting rpc services: rpcbind done.
Setting netmask of bge0 to 255.255.255.128
Setting default IPv4 interface for multicast: add net 224.0/4: gateway yfvtdm10
syslog service starting.
Starting IONA Orbix E2A services for domain openideas13
Setting environment for domain openideas13
IONA services logging to: /var/opt/iona/openideas13/logs
Starting iona_services.locator.yfvtdm10
Starting iona_services.node_daemon.yfvtdm10
Starting iona_services.naming.yfvtdm10
Finished.
Starting I-DEAS Resource Locking Daemon
Starting I-DEAS Resource Locking Daemon
nohup: cannot open/create nohup.out: Permission denied
Starting Orbix E2A services for the openideas11 domain
Sending output to nohup.out
Starting Orbix 6.3 services for the openideas13 domain
Sending output to nohup.out
Warning: OS level changed from 5.8 to 5.9.
Run /opt/SUNWsan/bin/san_recover
volume management starting.
Using /var/run
Oct 30 12:05:31 yfvtdm10 snmpXdmid: Error in Adding Row for Subscription Table Entry
Oct 30 12:05:31 yfvtdm10 snmpXdmid: Failed to add filter to SP for Event delivery
Could not enable logging for /cdrom/sol_10_807_sparc/s6 on /vol/dev/dsk/c0t0d0/sol_10_807_sparc/s6.
File system is mounted read only.
Please see the remount option described in mount_ufs(1M).
Could not enable logging for /cdrom/sol_10_807_sparc/s5 on /vol/dev/dsk/c0t0d0/sol_10_807_sparc/s5.
File system is mounted read only.
Please see the remount option described in mount_ufs(1Md in mount_ufs(1M).
Could not enable logging for /cdrom/sol_10_807_sparc/s1 on /vol/dev/dsk/c0t0d0/sol_10_807_sparc/s1.
File system is mounted read only.
Please see the remount option described in mount_ufs(1M).
Storing unknown to /var/run/psn
The system is ready.



各位,有什么办法帮我解决以下,很是着急啊。郁闷!

feiniao222 发表于 2011-10-30 13:13

请各位帮帮忙,小弟实在搞不了了,疯掉!

feiniao222 发表于 2011-10-30 13:21

希望大家给我看看,怎样才可以把root密码清掉。谢谢!

非凡公子 发表于 2011-10-30 14:48

在OK下打printenv 查看启动的硬盘顺序
在OK下setenv 可以指定启动硬盘,指定你改好密码的那一块
这样试试.

财版 发表于 2011-10-30 19:22

bootcdrom-s
mount/dev/dsk/c1t0d0s0/mnt
cd/mnt/etc
cat vfstab
看分区表中目录挂载情况,然后再请密码。如果做过镜像,两块盘都要清除shadow中的密码。:em27:

zhmzhouming 发表于 2011-10-31 09:30

如果做过镜像,需要修改另外一块硬盘的shadow文件,或者拆除镜像然后从c0t0d0启动然后进去再做镜像。

calcm 发表于 2011-11-02 11:14

试着拔出一块盘,再修改相关的文件,做了mirror直接手工改2个文件是不行的,虽然文件的内容改后是一样的
或者找张带VXVM环境的光盘启动,import rootdg,修改相关文件试试

feiniao222 发表于 2011-11-02 14:32

回复 7# calcm

谢谢大家的帮助,问题解决了!
页: [1]
查看完整版本: 求助!root忘记密码了,网上的方法用过了还是不行。很着急