Home
Developer Resources
QNX RTOS v4
QNX RTOS v4 Knowledge Base

QNX RTOS v4 Knowledge Base

Foundry27
Foundry27
QNX RTOS v4 project
Resources

QNX RTOS v4 Knowledge Base

Title Lost the root password (QNX4)
Ref. No. QNX.000005687
Category(ies) Configuration
Issue The root password has been changed or forgotten on our QNX4 system. How would you go about restoring root access without reinstalling the OS?




Solution How to remove the ROOT password if is is lost or has been forgotten:

Via Floppy Diskette

1.  Boot up off the QNX Boot diskette.

2.  When the splash screen displays "QNX" in large letters there should be a prompt.  Now type

    /bin/disktrap

3.  Now type in the return from disk trap, it may look like this:

    Fsys.ide

4.  Once the hard drive controller is running, mount the partition table for the hard drive that has QNX isntalled on it.  Do this by typing:

    mount -p /dev/hd0

5.  The last command will have mounted the partition table, now mount the partition that contains QNX.  Do this by typing:

    mount /dev/hd0t77 /hd

assuming that hd0t77 is the partition that QNX is installed on.

6.  Now change the prefix from the floppy drive to the hard drive.  Do this by typing:

    prefix -R /=/hd/

this will now allow QNX to run as if it had booted normally and logged in as root, now there is access to all utilties and programs that are installed on the hard disk.

7.  Now edit the /etc/passwd file.  This is what the root users entry may look like:

    root:x:0:120:Super User:/:/bin/sh

Change it to look like this (take out the "x" in the begining).

    root::0:120:Super User:/:/bin/sh

8.  Save and close the file and reboot like normal and login using the user name "root".

9.  To create a new password for root, use the "passwd" utility.