Trouble building my own Pam module..

mikey at segel.com mikey at segel.com
Tue Feb 21 12:13:25 UTC 2006


Ok,

I'm probably doing something totally braindead, but I'm stuck and running out 
of ideas.

Platform: SuSE Linux 10 in 64 bit mode on Intel 
Version of PAM: Linux-PAM-0.99.3.0
(Note: I had to download it and build it myself, then installed it.)

I'm trying to build a module called pam_ifmx.
This module will connect to an Informix database and verify the user name and 
the password provided. 

This module is based on Carsten Koester's module which is based on  Charl P. 
Botha's pam_pwdfile module.

The code looks clean. (I've compared it to the source code of other modules 
that are part of the PAM src code...) I had to modify Carsten's code to take 
advantage of the latest stuff in Informix's IDS 10. 

Because this starts out as an .ec file, I have to preprocess it using esql, 
then use gcc with the following options:
gcc -fPIC -c pam_ifmx.c -I${INFORMIXDIR}/incl/esql -DDEBUG

Then ld it using the following options:
ld -x --shared -o pam_ifmx.so pam_ifmx.o -L/opt/pam/Linux-PAM-0.99.3.0/libpam 
-lpam -L${INFORMIXDIR}/lib/esql -L${INFORMIXDIR}/lib -lifsql -lifasf -lifgen 
-lifos -lifgls -lm -ldl -lifglx ${INFORMIXDIR}/lib/esql/checkapi.o

This created the .so file.

I moved it to the /lib/security directory.

In my syslog I get the following output...
Feb 21 05:49:03 dbrack01 oninit: PAM adding faulty 
module: /lib/security/pam_ifmx.so
Feb 21 05:49:03 dbrack01 oninit: PAM unable to 
dlopen(/lib/security/pam_ifmx.so)
Feb 21 05:49:03 dbrack01 oninit: PAM [dlerror: /lib/security/pam_ifmx.so: 
cannot open shared object file: No such file or directory]         

Ok.... having said all of that...

What am I missing and what brain dead thing did I do wrong?

I also copied and modified an .la file to create a pam_ifmx.la although I'm 
not sure if that helps.

Can anyone help, or did I gum up the works too bad?

TIA!

-Mike





More information about the Pam-list mailing list