Resetting the root-Password

 General Information

Introduction

From time to time people get an used SGI, but there is a root-password which they don't know. Then there is the question: How to get rid of that password without a complete reinstallation of IRIX?

There are several ways of removing a root password when a reinstallation of IRIX is not an option.

Using another SGI Box

One technique is simply removing the harddrive from the SGI and connecting it to another SGI running IRIX (the same or a newer version). This might include changing the SCSI-ID in order to avoid a collision with another SCSI-device on the same bus. Then you can mount that harddisc and remove the password field from /etc/passwd on that harddisc (be sure not to edit the /etc/passwd-file on the machine itself!).

Now you have to find out the hardware-adress of the newly connected harddisc. This can be done by typing hinv at the command line - of course all other SCSI devices will be listed here, too.

Now you might have to make the /etc/passwd-file writable by typing

% chmod a+w /mount_point/etc/passwd

Then you can edit the file with your favorite editor. The following shows a typical passwd-file:

root:abcdefghij:0:0:Super-User:/usr/people/root:/bin/csh
sysadm:*:0:0:System V Administration:/usr/admin:/bin/sh
cmwlogin:*:0:994:CMW Login UserID:/usr/CMW:/sbin/csh
diag:*:0:996:Hardware Diagnostics:/usr/diags:/bin/csh
daemon:*:1:1:daemons:/:/dev/null
bin:*:2:2:System Tools Owner:/bin:/dev/null
uucp:*:3:5:UUCP Owner:/usr/lib/uucp:/bin/csh
sys:*:4:0:System Activity Owner:/var/adm:/bin/sh
adm:*:5:3:Accounting Files Owner:/var/adm:/bin/sh
lp:*:9:9:Print Spooler Owner:/var/spool/lp:/bin/sh
nuucp::10:10:Remote UUCP User:/var/spool/uucppublic:/usr/lib/uucp/uucico
auditor:*:11:0:Audit Activity Owner:/auditor:/bin/sh
dbadmin:*:12:0:Security Database Owner:/dbadmin:/bin/sh
sgiweb:*:13:60001:SGI Web Applications:/var/www/htdocs:/bin/csh
rfindd:*:66:1:Rfind Daemon and Fsdump:/var/rfindd:/bin/sh
EZsetup::992:998:System Setup:/var/sysadmdesktop/EZsetup:/bin/csh
demos::993:997:Demonstration User:/usr/demos:/bin/csh
OutOfBox::995:997:Out of Box Experience:/usr/people/OutOfBox:/bin/csh
guest::998:998:Guest Account:/usr/people/guest:/bin/csh
4Dgifts:*:999:998:4Dgifts Account:/usr/people/4Dgifts:/bin/csh
nobody:*:60001:60001:SVR4 nobody uid:/dev/null:/dev/null
noaccess:*:60002:60002:uid no access:/dev/null:/dev/null
nobody:*:60001:60001:original nobody uid:/dev/null:/dev/null
kaya:abcdefghij:3002:20:Kaya Memisoglu:/usr/people/kaya:/bin/csh

Simply remove the encrypted password for root (marked red), save the file and restore the access rights by typing

% chmod a-w /mount_point/etc/passwd

That's all, you are ready.

Using a Linux Box

Of course, not all people do have another SGI at home to connect the harddisc, but maybe some do have a recent Linux installation running. Then you might try to do the same, as newer Linux releases do support the SGI file system XFS (and maybe even EFS?). But I never tried this, so I can't tell you if/how it works.

Booting an Installation CD

Of course, not all people do have another Linux or SGI box ready for connecting the harddrive. The last possibility to wipe out root's password is to boot an IRIX CD. You need an IRIX installation CD (an overlay installation CD is enough) and then you have to boot fx. See these instructions for booting from CD. If you don't have an appropriate SCSI CD-ROM, then you can also boot over network.

A Final Note

After you have successfully removed the root password, you still will have to change a lot of settings. Especially if your machine needs a very long time to boot, this is a sign that formerly it was part of a NIS domain and tries to mount some NFS directories. See here to remove NFS directories to speed up booting.

 Links
Links