helphelphelp, can not login after a misuse of passwd

on purpose of set a password on a embedded pc/104 machine, I did this:

passwd root

Password: aaa
re enter password: aaa

logout

and then, it always show me login, login,login… like this:
login:root
login:root
login:root
login:root
login:root
login:login incorrect

It seems that the superuser root and its associated folders and files have been damaged cause my misuseing passwd, right?

How can I fix it with least touch on the original system?

As a newbie here, appreciate any of your help and suggestions! :open_mouth:

I don’t know what went wrong, but to fix it you could boot from the CD and edit /etc/passwd to remove the x found on the line that defines root. Or you could move the HD to another machine that has QNX6, mount that hardware and then manually edit /etc/passwd.

hi,

I guess the problem is from my using “passwd root”, which actually create a new user named “root” to overwrite the system administrator"root".
This may be a misuse of passwd command.

The situation here is that this is an “old” pc/104 embedded system, built by other guys a few years ago. It does not have hard drive, floppy disk drive and cd drive, although it has an 80 pins I/O connector on the motherboard.

Is there any other method to fix this problem without reboot from a CD drive?

I can login using another account which is not set a password. Any user account setup with password can not login into this pc/104 computer. Sounds weird?

It’s possible that the installation is corrupted. There was some patch issue that solved security issue, mainly generation of password. It’s possible that this security update wasn’t installed correctly. You might have an old passwd program with a new login program or vice versa.

Unless some of the user you can login to were somewhat given root permission then there is nothing you can do but boot from a CD (or HD).

It must have some sort of storage device, probably a disk on chip or compact flash. You can also install a network card that you could boot from (but that’s not easy for beginners)

It must have some media, hard drive, compact flash, EEPROM. You could try moving this media to another running QNX system, read and fix it.

yes, it has a 16mb DRAM on the motherboard.
This is an Ampro CoreModule/P5i board with cpu and DRAM on it. The OS image was burned into the DRAM by other guys.( I am not familiar with how to burn a OS image into this machine), no hard drive, no floppy disk drive or cd drive.
It does have an 80 pins I/O port, and says for “Floppy and EIDE”. It may provide a way to connect floppy, hard drive and cd drive.

One thing I am not sure is that whether the DRAM with the motherboard can be treated as a hard drive to connect to another QNX computer to access its content, or it may damage its content?

Expecting any suggestion!

It is very unlikely that the file system is on a DRAM (Dynamic RAM). You would need a permanent battery backup to keep the DRAM from losing all information whenever you powered the computer down. A static PROM or EPROM Read-Only Memory could have a boot image on it, but it would be impossible to corrupt the files. So that leaves the possibility of an EEPROM (Electronically updatable EPROM) or FLASH. Either of these has its own way of connecting, which you would have to follow. Either of these devices could also be soldered in making removal close to impossible. Otherwise, if done correctly there should be no way of damaging the device. If not done correctly, there is the distinct possibility.

Since you have EIDE/Floppy connectors, it might be possible to boot off of one of these devices, and then be able to repair your problem.

I assumed there is no other memory media except DRAM, because I didn’t find any of them physically or during testing step when the computer reboots or in “IDE HDD AUTO DETECTION” in CMOS SETUP UTILITY. Is this kind of information like ROM or “on-board DiskOnChip Flash disk” invisible to users?

Thanks to your mention. I do find in the manual there shoud be an On-Board Flash Memory for the standard CoreModule/P5i board. It is a diskonchip drive which can be enabled or disabled in setup. When enabled, it is treated as a hard drive.
Since I can not find any hard drive, is it disabled?
To setup this diskonchip drive, it seems need special utilities and Kit, which I doubt I can get in a short time.

Looks like the best way I can do in this situation is to connect a cd drive and boot it! I’d like to report it later.

thanks you guys.

I couldn’t be in DRAM. Requires a significant amount of power to keep intact, because they need to be refreshed, that is why they are called “dynamic” ram. You would need a big batteries to kept it intact for more that a day. That the difference between static ram, that requires much less power.

So it’s definitely has to be some sort of onboard flash memory, now depending on the type of flash memory, once you booted with the CD (or any other device) you may need a driver to access it.

DiskOnChip must be your hard drive. See if you can boot a CD.

I attached cd drive, a hard drive and a floppy disk drive to the pc/104 using some IDC connectors;
reinstalled the qnx os from cd to hard drive;
contacted Ampro company and M-System company to send me utilities to format and install driver on the DiskOnChip2000,
burn a os image into DOC
and restart it.
Of course, there are a lot of details and tricks which take my effort to figure them out.
But, finally, now, it it is working!

Ok,some other small issue is coming. It is the editor, vedit, can not work properly,which means I can not toggle between insert mode and typeover mode, can not move cursor using arrow keys. But if boot from hard drive, the editor vedit works fine. It perhaps is about keyboard setup not properly configured during making image OS?

Anyway, the problem that “can not log into the PC/104 computer” is solved. Feeling so good!
Thanks all you guys helping me through this experience.

It might be the keyboard setup, or more likely the terminal setup. Try:

set | grep TERM

on both systems and see if that tells you something important.

I think you also need /etc/termcap and/or /etc/terminfo (going from memory)

Yes, it does relate to the TERM.
However, I can not try set | grep TERM, because the os image on DOC does not contain grep utility.
So, I tried another way, to change the .boot file of DOC
/bin/sinit
$ sinit TERM=ansi

to

/bin/sinit
$ sinit TERM=qnx

then it works.

Thanks all