is there some way (C-function, library…) in QNX4+Photon how to authenticate system passwords (which are encrypted, we cannot read them from somewhere for comparison=verification) required to enter by qualified operator at some operations in our application (editing critical parameters, manipulating critical devices…)?
Where we can find “Watcom C 10.6 Security patch” (which contains the latest version of unix3s.lib)?
Are we looking for: unix3s.lib 97280 17Jun2000?
Is it unix3s.lib which contains crypt() function?
Several people say that even after installing “Watcom C 10.6 Security patch” no unix3s.lib is installed…
In usr/include/(anything).h there is no reference for crypt() function.
Update:
We tried to install QNX Suite 2000 “Watcom Security Update” and two libraries don’t appear in usr/lib:
unix3s.lib,
unixg3r.lib.
From the internet research I mean that not only us have this problem.
The same situation is with QNX CD Suite 2011 (both libraries missing).
Thank you, we were looking always in /usr/lib instead of /usr/watcom/10.6/usr/lib.
Do we need to copy/install some libraries from /usr/watcom/10.6/usr/lib to root/usr/lib before we use (functions of)them?
Thank you very much maschoen. Our developer already found, tried and understood (how to use it) the crypt() function for authentication of system USER/PASSWORD inside our application.
I am trying to use crypt() function in my application code to create a new user and add entries in passwd/opasswd/shadow/oshadow files. I am getting 13 character output from crypt() function and adding the same in shadow file but still unable to login with my new user.
Is there is anything i am missing. If i am using passwd utility it is working well.
Below is default look of shadow file with only root as user
root:T4QIvurux5uOI:1195089751:0:0
Entries in the shadowed password file are first delimited by : and split into the following sections:
username – user account name @S,100@386d…truncated…da5d@129b6761 – printable hash string (varies depending on the hash function used)
1448613322 – Unix epoch timestamp of when the password was set
0 – unknown
0 – unknown
The guess is those last 2 values are related to locking out user accounts.
The problem appears to be you need to run the crypt call many times. The doc’s say 1000 times using SHA-512 with a salt of 16 bytes: