I have IBM Informix SE DBMS running on 64-bit RedHat 8.7 Linux. This is a 32-bit product.
It works well for a locally defined user such as Username billd
with UID 505
. For example they can run dbaccess stores7 sel_order
and get the correct results from the IBM Informix demo database supplied with the product.
The system also has sssd running integrated with a Microsoft Active Directory (AD) service. This means that people can also login using their Windows username and credentials. This produces usernames like willaim.donaldson@researchgroup.example.com
with UIDs like 507735929
When these AD users run dbaccess stores7 sel_order
they get Informix error
25590 - "authentication error".
The help for this error is
This error indicates that an invalid user ID or password was used to
connect to the database server. Redefine a valid user ID and password.
A quick strings check showed that dbaccess contains getpwuid
and getpwnam
.
I suspect there might be an issue either with one or more of
- The size of the UID expected by
getpwuid()
- 505 fits in a int16, 507735929 needs an int32? - The length of the user-name (e.g. 32 characters instead of 10 or less)
- The absence of an entry in /etc/passwd
- A missing 32-bit library that makes sssd work with 32-bit applications
- Something else
Can anyone suggest what might be the cause, whether it is unsolvable or what a fix might be?
Update
I compiled 32-bit (gcc -m32) and 64-bit versions of the 25-line whoami.c code from https://stackoverflow.com/q/8953424/477035
With a local user, both 64-bit and 32-bit versions work
With an AD user, the 64-bit program works but the 32-bit program gets an empty result from getpwuid(uid)
where uid is from geteuid()
.
So I suspect this may be the root of the problem - have I missed something and is there anything else I can try?