View topic - I can't login as root

I can't login as root

For the old QNX2 and QNX4 RTOS

I can't login as root

Postby sewers » Wed Feb 07, 2007 11:24 pm

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....
sewers
New Member
 
Posts: 1
Joined: Wed Feb 07, 2007 11:11 pm

RE: I can

Postby mario » Thu Feb 08, 2007 3:13 am

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
mario
QNX Master
 
Posts: 4132
Joined: Sun Sep 01, 2002 1:04 am

RE: I can

Postby mv » Thu Feb 08, 2007 4:47 pm

I think the easiest way is to change /etc/passwd over QNET from other node on which you have root privileges.
mv
New Member
 
Posts: 7
Joined: Fri Aug 18, 2006 11:48 am

RE: I can

Postby maschoen » Thu Feb 08, 2007 7:05 pm

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.
maschoen
QNX Master
 
Posts: 2715
Joined: Wed Jun 25, 2003 5:18 pm

RE: I can

Postby Hiankun » Fri Feb 09, 2007 7:54 am

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
Hiankun
New Member
 
Posts: 2
Joined: Wed Jan 31, 2007 4:42 am

Postby Hiankun » Fri Feb 09, 2007 8:02 am

Here is the photo of the PCM-3350 with the CF1 and CF2 on it.

Image
Hiankun
New Member
 
Posts: 2
Joined: Wed Jan 31, 2007 4:42 am

Postby qnxloader » Fri Feb 09, 2007 9:00 am

mount -p /dev/hd0 /dev/hd0t77 /
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am


Return to QNX2 and QNX4

Who is online

Users browsing this forum: No registered users and 1 guest