Problem writing module

Thiago Bezerra Lima e Silva tbls at brturbo.com
Fri Jan 21 17:22:38 UTC 2005


I'm no sure if I understood. If you are saying that I should see the module logs (the ones I write on 
it, right?), that doesn't help since I tested having this code on the module: 
 
PAM_EXTERN int pam_sm_authenticate(pam_handle_t *ph, int flags, int argc, const char **argv) 
{ 
  printf("module: returning success!\n"); 
  return PAM_SUCCESS; 
} 
 
When using this module on login, it shows the message above and thats it for a few seconds, until 
the message "Login timed out after 60 seconds" appears and the "login:" prompt appears again! 
Any suggestions??? 
 
 
-----Mensagem original----- 
De:   Jason Gerfen <jason.gerfen at scl.utah.edu> 
Enviada em: 21/01/2005 14:15:39 
Para: Pluggable Authentication Modules <pam-list at redhat.com> 
Assunto: Re: Problem writing module 
 
Look in the log files on your system and you might get some good  
debugging information if the module has a logging function coded into it  
already.  If you need an easy to use logging function for your module  
look in the source for the Linux-PAM package's other modules. 
 
Thiago Silva wrote: 
 
>Hello all. 
>I'm currently developing a module for PAM and having some difficulties. 
>First, the module is linked with the NSS lib (from mozilla). Trying it on  
>login, wverything runs well, pam_sm_authenticate() returns PAM_SUCCESS, and  
>there comes the problem. The login locks for some time, and then, prints a  
>message of time out, showing the login prompt again. I have no idea why is  
>this happening. I've tried to substitude the module's code for the  
>pam_permit.c code, wich gave me another error: "Login incorrect" (the  
>pam_sm_authenticate wasn't called and I assume that was because the little  
>code was linked to the NSS lib and something went wrong when loading the  
>module)...Does anyone know this behaviour or can help me debugging?? I have  
>no idea how to debug the login... 
> 
>Also, I did a little program that uses this module, and, pam_authenticate()  
>returns PAM_SUCCESS, and then, the shell is available again. So, nothing  
>strange here. Only when using it with login. 
> 
>Thanks in advance 
> 
>_______________________________________________ 
>Pam-list mailing list 
>Pam-list at redhat.com 
>https://www.redhat.com/mailman/listinfo/pam-list 
>   
> 
 
 
--  
Jason Gerfen 
Student Computing 
Marriott Library 
801.585.9810 
jason.gerfen at scl.utah.edu 
 
"And remember... If the ladies 
 don't find you handsome, they 
 should at least find you handy..." 
             ~The Red Green show 
 
_______________________________________________ 
Pam-list mailing list 
Pam-list at redhat.com 
https://www.redhat.com/mailman/listinfo/pam-list 
 


More information about the Pam-list mailing list