Removing Root Password from SGI Systems

 

Removing Root Password from SGI Systems

Problem:  The root password has been lost or forgotten for your SGI workstation.

Assumption:  You know the password for the PROM Monitor or it has not been set.   If the PROM Monitor password has been set and you do not know it, refer to the appropriate system reference manual for instructions on how to disable the PROM Monitor password.  On many SGI workstations adding or moving a jumper on the motherboard accomplishes this.

Throughout the text are comments that will explain what you are doing or what is about to happen as a result of executing a command.

  • Commands that you are required to enter, are indented, HIGHLIGHTED USING BOLD print next to the prompt that would be displayed, and will be surrounded by a double box. See example below:

    # pwd

  • Occasionally you will be instructed to do something and the instructions are not indented, but they will still be in bold print and surrounded by the double box.
  • The stdout or stderr of each command, or terminal output that would result from something that you are required to do, will be beneath the command, left justified and HIGHLIGHTED USING ITALICS and surrounded by a single box. See example below:

    root/usr

 

  • The information comments will be in normal print.

Software Installation Tools General Information

The IRIX operating system and all the optional software products are released as a set of CDROMs.  The IRIX 5.X and 6.X release CDROMs contain the following:

  •  Partition 8 (volume header)

- sashARCS                The ARCS sash.

The 5.0 and 5.0.1 CDROMs contain only sashARCS, while the 5.1.1 and later CDROM contains the sash images for all the different CPU types.

- mr                             The mini-root.

- proml.03                  Code for I04 flash prom (Release 5.0 only).

- io4prom                   Code for I04 flash prom (Release 5.1.1).

  •  Partition 7

-  /dist                            The directory that holds:

- sa                              The standalone tools used for installing software.

- software images     The actual software images.

-  /stand                         The directory that holds:

- sashARCS                Another copy of the ARCS sash.

- fx.ARCS                   A copy of the ARCS fx.

- ide.IP19                   Copy of the CPU ide.

Copies of other sash, fx, and ide images are maintained in /stand for the other CPU types on the 5.1.1 and later CDROM.

- /insight                       SGI Bookshelves.

The Standalone Tools are, sash, fx, and the mini-root.

The mini-root, with it's Install Utility (inst), is used to build a new operating system or update (add to) an existing system with additional software images.

The mini-root loads into and runs out of the system disk swap partition. The mini-root, because it resides in the swap partition, and has the special directories of /root and /root/usr, in which it mounts the root and user partitions.

Begin Actual Procedure.

STEP 1: Booting the Mini-Root and Starting the Install Tool (inst)

You must be in the PROM Monitor in order to boot the mini-root from the CDROM.

System Maintenance Menu

 

1) Start System

2) Install System Software

3) Run Diagnostics

4) Recover System

5) Enter Command Monitor

 

Option ?

We will start the process by selecting choice #2: Install System Software.

The PROM Monitor will prompt you, asking you if the load device is a local or remote device.

The PROM Monitor will load sash from the volume header of the CDROM, and then sash will load the mini-root from partition 7 of the CDROM.

Once the mini-root is loaded, the Installation Tool (inst) is started, which you will immediately exit by starting a mini-root shell. Once in the shell, you will use vi to edit the /etc/passwd file.

The load from the CDROM will take several minutes, during which time dots are output to the screen to inform you that the load is progressing.

Let�s load the mini-root.

Install the IRIX CDROM contain the installation tools into the reader

 

Option 2

 

Installing System Software.

 

Press <Esc> to return to the menu.

1) Remote Tape 2) Remote Directory 3)[Local CD-ROM] 4) Local Tape  *a) Local SCSI CD-ROM drive 6

 

Enter l-4 to select source type, a to select the source, <esc> to quit, or <enter> to start

 

Enter l-4 to select source type, a to select the source, <esc> to quit, or <enter> to start: 3

 

Enter l-4 to select source type, a to select the source, <esc> to quit, or <enter> to start: return

 

Insert the installation CD-ROM, then press <enter>:

 

Insert the installation CD-ROM, then press <enter>: return

 

Copying installation program to disk.

. . . . . . . *. 10% . . . . . . . . . 20% . . . . . . . . . 30% . . . . . . . . . 40% . . . . . . . . . 50%

. . . . , . . . . 60% . . . . . . . . . 70% . . . . . . . . . 80% . . . . . . . . . 90% . . . . . . . . . 100%

Copy complete

Copyright 1987- 1993 Silicon Graphics, Inc.

All Rights Reserved.

Creating miniroot devices, please wait...

The system is coming up.

The system is ready

Current system date is <date and time> PST 1993

 

Dir Reorg: Mounting file systems:

 

Mounting file systems:

 

/dev/dsk/dks0d1s6                on              /root/usr

Default location of new software is /CDROM/dist

If you are a first-time inst user, give the command 'help beginner'.

Inst Main Menu

1. from [source                           Specify location of software to be installed

2. list [keywords] [names]         Display information about software subsystems

3. go                                            Perform software installation and removal now

4. install [keywords] [names]    Select subsystems to be installed

5. remove [keywords] [names]   Select subsystems to be removed

6. keep [keywords] [names]       Do not install or remove these subsystems

7. step [keywords] [names]        Enter interactive mode for install/remove/keep

8. versions [args]                        Get information about installed software

9. help [topic]                             Get help in general or on a specific word

10. admin                                    Go to the Administrative Commands Menu

11. quit                                       Terminate software installation

Inst>

After inst creates a filesystem in partition 6 and mounts it at /root/usr, it displays it's Main Menu.

*****************WARNING***************

When the mini-root is started, the system disks partition table is modified to allow the install tool to function correctly. When you quit the install tool, the partition table will be set back to its correct values by inst, therefore, while in the mini-root shell, do not forget how you got there and inadvertently attempt a reboot or shutdown. You must return to inst and select quit to insure that the partition table is returned to its normal settings.

Also, when you are normally in inst and want to quit, you would select quit and inst would ask you if you wanted to reboot the system. Since there is no root filesystem, the reboot would fail. Inst knows this and would not allow the reboot and would instead output an error message informing you that the root filesystem was not usable.

STEP 2: Starting a Mini-Root Shell.

Let's exit the install tool by starting a mini-root shell.

 

Inst> sh

#

 

 

 

 

Now that we are in a mini-root shell, let's use the ls command and look at the mini-root top level directory (/).

STEP 3: Editing the /etc/passwd contents to remove the password for root.

We will use the vi screen-oriented (visual) display editor to edit the contents of the passwd file.  Remember that when mini root loaded no .profile or .cshrc files contain path statements or other use environmental variables were loaded.  This means that you will need to provide the absolute path to vi and the passwd file.

Open the passwd file using vi.

#> /root/bin/vi /root/etc/passwd

Here is a sample /etc/passwd file which this command opens:

root:q.mJzTnu8icF.:0:10:superuser:/:/bin/csh

bill:6k/7KCFRPNVXg,z/:508:10:& The Cat:/usr2/bill:/bin/csh +

john:+@documentation:no-login: +::::Guest nobody:*:-2:-2::/dev/null:/dev/null

In this example, there are specific entries for users root and bill, to assure that they can log in even when the system is running stand-alone or when the NIS is not running. The user bill has 63 weeks of maximum password aging and 1 week of minimum password aging.  Programs that use the GECOS field replace the & with `Bill'. The user john has his password entry in the NIS incorporated without change; anyone in the netgroup documentation has their password field disabled, and anyone else is able to log in with their usual password, shell, and home directory, but with a GECOS field of Guest. The user nobody cannot log in and is used by the exportfs(1M) command.

To remove the password for root you want to delete the characters between the first and second : in the line starting with the word root.  To do this use the space bar to move the cursor over the first character to be deleted.  If you go to far you can use the back space key to the cursor back one character at a time.

Once you reach the first character delete it using the x key continue this until all of the characters between the two : are deleted. 

After you have finished deleting all of the characters between the two colons, press the Esc key to make sure that you are not in an edit or delete mode.

The next step is to save the modified file and exit vi.  Use the following commands to accomplish this.

:w!

:q

If you delete too many characters you can undelete a single character using the u key or alternatively quit the file leaving it unchanged by typing :q! without first typing :w!, which writes out you changes to the disk file.

STEP 4: Returning to the Install Tool.

If you remember, we started the mini-root shell (using sh) while we were in the install tool (inst).

I mentioned (at that time) that the install tool modifies the partition table to suit its own needs, and the current state of the partition table is not compatible with IRIX.

You must return to inst and select quit, allowing inst to restore the volume header to the state that it was in before inst was started.

Follow the procedure on the next page to exit the mini-root and terminate inst.

Return to inst using exit.

If you removed any files while you were in the shell, give the 'admin recalculate' command to update the disk space requirements.

 

Inst>

 2. When inst is entered, execute quit.

Inst> quit

 

Please wait.. . . . .

Ready to restart the system. Restart? [y,n]

 

3. Answer yes, allowing inst to clean up the volume header.

Ready to restart the system. Restart? [y,n] yes

 

The system will now reboot into IRIX

Comments