免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2982 | 回复: 0
打印 上一主题 下一主题

find out trusted system root passwd [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-08-27 10:57 |只看该作者 |倒序浏览
#1) Once you remove the hard drive from the system that you cannot log onto as root, change the SCSI address jumper on the drive to something other then ID 6 -- since more then likely the system you hook the drive up to will be using SCSI ID 6 for it\'s boot drive.

#2) Once you hook the drive up to the live system, you will want to do a ioscan -fnC disk to determine the address and device file of the new drive.  Your output for this command will resemble this:

# ioscan -fnC disk | more
Class     I  H/W Path      Driver      S/W State   H/W Type     Description
============================================================================
disk      0  8/0/19/0.2.0  sdisk       CLAIMED     DEVICE       IBM     DDRS-345-60WS
   
                      /dev/dsk/c0t2d0   /dev/rdsk/c0t2d0

disk      1  8/16/5.6.0  sdisk       CLAIMED   DEVICE    SEAGATE ST32151N
                        /dev/dsk/c0t6d0   /dev/rdsk/c0t6d0

disk      2  8/16/5.2.0    sdisk       CLAIMED     DEVICE       TOSHIBA CD-ROM X
M-6201TA

                          /dev/dsk/c1t2d0   /dev/rdsk/c1t2d0

In the above system there are three disks.  For your case, more than likely the c0t6d0 is the boot disk and the other non-CDROM disk would be the one you just installed in the system (/dev/dsk/c0t2d0) (SCSI address 2).  Once confirmed that the new disk is there and correct you should be able to mount it:

mkdir /disc
mount /dev/dsk/c0td20 /disc

Once mounted you can access the password file on the second disk by entering vi /disc/etc/passwd

Make the root password line in this file look like this:

root::0:3::/:/sbin/sh

Write and quit this file and when you hook the drive back up to the machine you took it out of you should be able to log on as root without having to enter a password
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP