View topic - I can't login as root

Page 1 of 1

I can't login as root

PostPosted: Wed Feb 07, 2007 11:24 pm
by sewers
I was playing with my passwd file and now can't seem to log in as root. Is there a "backdoor" way to get in so I can copy over my backed up copies of /etc/oshadow and /etc/opasswd? This is on a QNX4.25 system...

That's what happens when a hardware guy starts messing with software....

RE: I can

PostPosted: Thu Feb 08, 2007 3:13 am
by mario
There is no backdoor (unless one was created). You must boot through a different device, mount the filesystem on that HD and the edit /etc/passwd. Usually remove the x in the root definition will get rid of the password.

The easiest is usually to install the HD as a secondary disk on a different PC

RE: I can

PostPosted: Thu Feb 08, 2007 4:47 pm
by mv
I think the easiest way is to change /etc/passwd over QNET from other node on which you have root privileges.

RE: I can

PostPosted: Thu Feb 08, 2007 7:05 pm
by maschoen
QNX 4 boots nicely off of a floppy, with plenty of room for the needed drivers and editor to fix the problem.
I have a make file around that will create such a floppy if you need one.

RE: I can

PostPosted: Fri Feb 09, 2007 7:54 am
by Hiankun
Hi,

I encounter almost the same situation when I try to modify the sysinit.1 file.

I did something stupid to add a line "stty +raw </dev/ser01" in the sysinit.1 file. When I wanted to boot again, the message showed there is no such a file or directory, then the system seemed to be hanged on. I waited for a long time, and it didn't go on to the next step.

My hardware is not a PC. It is a PC/104 single board computer, an Advantech PCM-3350.

The original QNX system is installed on a CF card (let me call it CF1). I tried to mount the original as the second disk, then use another CF card (let me call it CF2) with installed QNX to boot in. However, I am not sure how to make it.

I mount the CF1 by rewrite sysinit.1 of CF2, but when I boot into the system of CF2, the CF1 cannot be mounted. The system detected CF1 and CF2 as primary master and secondary master respectively.

Here are some test I did with the sysinit.1 of CF2. Please check it and show me what's wrong with my work. Thank you.

----------------------
First, I found the example in the QNX instruction manual, and followed it:

  mount /dev/hd0t77 /
  mount /dev/hd1t77 /home2

But the mesaage when booting showed:
  mount: stat() on /dev/hd0t77 failed: No such file or directory
  mount: stat() on /dev/hd1t77 failed: No such file or directory
----------------------
Then I check the /dev/ directory, found the hard disks were:

  hd0.0
  hd1.0
  hd1.0t6
  hd1.0t77

So I change the mounting description as:

  mount /dev/hd0.0t77 /
  mount /dev/hd1.0t77 /home2

And the message showed:

  mount: stat() on /dev/hd0.0t77 failed: No such file or directory
  mount: mount() on /dev/hd1.0t77 failed: Resource busy
----------------------
Finally, I thought that CF2 was used for boot, so maybe it is why the message showed "resource busy". Therefore, I rewrite the mounting description as:

  mount /dev/hd1.0t77 /
  mount /dev/hd0.0t77 /home2

And the message only showed:

  mount: stat() on /dev/hd0.0t77 failed: No such file or directory

PostPosted: Fri Feb 09, 2007 8:02 am
by Hiankun
Here is the photo of the PCM-3350 with the CF1 and CF2 on it.

Image

PostPosted: Fri Feb 09, 2007 9:00 am
by qnxloader
mount -p /dev/hd0 /dev/hd0t77 /