ftpd? can't login...

it’s me again!

after recieving great help and tipps last time, i try again to ask you all and tell my (new) problem.

it’s because i want to connect to my hd-less target by ftp. everything is running quiet perfect, but i can’t login, because of the password… :cry:

i looked everywhere in the documentation but i could not find the file where the passwords for ftp are saved.

has anyone an idea?

P.S.: to connect with user “ftp” (guest) doesn’t work…:frowning:

thx
mb

ftp passwords are same as system passwords, they are stored in /etc/shadow and /etc/passwd, note: user which wants to connect ftp must have non-empty password

oh i found this file “long ago”…but there only are useres and rights…and if the user has any password or not. but somebody told me that there is a file, where the passwords are stored encrypted…or something else…

its because the system password doesn’t work…:frowning:

/etc/passwd contain user definitions
/etc/shadow contain encrypted passwords for users

/bin/passwd tool to manage users (in qnx also create users)

/etc/ftpusers contain list of users who are not allowed to connect into ftp

you can use “passwd guest” command to set a password for your user “guest”.
btw, if your “guest” user uses a non-standard shell (eg: bash), you will need to add that into /etc/shells file.

Read this for details:
qnx.com/developers/docs/mome … /ftpd.html

There is another problem.

i try to change the password of several users on my system, yesterday, but i had to realize, that i won’t get both files on one floppy. everytime i try to include:

/etc/passwd    and
/bin/passwd

the first file is overwritten by the second and i never could change any password. how may i be able to include both files in different folders? for example: /bin/passwd in /proc/boot and /etc/passwd in /etc or somewhere else?!?!
i already tried but failed regularly…:frowning:

can anybody help?

do not execute this in your script: “ln -sP /proc/boot /etc”
instead do what you said:
/bin/passwd in /bin/ (/proc/boot/) and
/etc/passwd in /etc/

That’s fine and i just know it…but how can i do this?? i already tried by setting PATH=/etc only for /etc/passwd but it doesn’t work…

Now i know thats this try was quite stupid…but i don’t know the answer of the problem yet…:frowning:

I hope this can help you, a most simple example:

[code][uid=0]

[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/bin:/sbin LD_LIBRARY_PATH=/proc/boot procnto
}

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

devc-con &
waitfor /dev/con1
reopen /dev/con1

[+session] sh

}

libc.so

[type=dir] /etc=/etc

[data=copy]
devc-con
sh=ksh
ls
cat
pidin
uname
/etc/passwd=/etc/passwd
/etc/shadow=/etc/shadow[/code]

hi again…

ok…i tried it like this…but by making the bootdisk there was an warning:

 Warning: Host file '/etc/passwd' missing
 Warning: Host file '/etc/shadow' missing
 Warning: Host file '/etc/inetd.conf' missing
 Warning: Host file '/etc/ftpusers' missing

and as i expected the folder /etc on bootdisk was empty. what did i wrong? here’s a part of my changed buildfile:

[type=dir] /etc=/etc

# libs necessary for runtime linker and network access
C:\QNXsdk\target\qnx6/etc/passwd=/etc/passwd
C:\QNXsdk\target\qnx6/etc/shadow=/etc/shadow
C:\QNXsdk\target\qnx6/etc/inetd.conf=/etc/inetd.conf
C:\QNXsdk\target\qnx6/etc/ftpusers=/etc/ftpusers
devn-ne2000.so 
npm-ttcpip.so
libc.so 
libsocket.so
libcpp.so
libm.so

I also tried with a code like this:

/etc/passwd=/etc/passwd

instead of

C:\QNXsdk\target\qnx6/etc/passwd=/etc/passwd

but there was no other effect…

Make sure that all the files (passwd, shadow, inetd.conf and ftpusers) are present in C:\QNXsdk\target\qnx6/etc/
Try to copy them from an already installed qnx6 and edit them to match your needs

jo…all the files are present in:

C:\QNXsdk\target\qnx6/etc/

and i already tried to copy them into the running system from my mounted directory by using:

cp passwd /etc/passwd

or

mv passwd /etc/passwd

but i got this error:

No such file or directory

so i decided to ask this froum…:slight_smile:
Its a frustrating building such a buildfile…;)

I have tested the buildfile i posted, however i built the image in qnx as the host system

btw, it is:
/etc/passwd=C:\QNXsdk\target\qnx6/etc/passwd
not
C:\QNXsdk\target\qnx6/etc/passwd=/etc/passwd

Yeah…that’s it…great!
Now this works…but when i try to change the password of some user there is another error:

 unable to lock password database (No such file or directory)

What does this mean again? What database is he looking for to lock?

Here another fact for riddling:
On another Machine there is login via telnet without any password, but login via ftp is with password. How could this be, because you told me that logging in via ftp uses the systempasswords…
its only a commentary…:slight_smile:

You cannot change password in the image because it is read-only, you can only change passwords before you create image or you can link the /etc/ in a writable area such as “ln -sP /dev/shmem /etc” like you did before in the buildfile script.

The /etc/shadow is the password database.

ftpd is using system passwords, another ftp servers do not have to use the system passwords necessarily

ok…i got mai failure…
i just used the wrong /etc/shaddow file for logging in via ftp …:frowning:
but now with the right file everything works!

thanks again…you were a really great help again!

mb