[Samba] pam_smbpass can't find password database

Martynas Buozis martynas at ti.com
Fri Oct 24 15:40:33 GMT 2003


Hello

Sorry for disturbing again. It looks like I must pass lot of compilation issues to force pam_smbpass working. And I don't believe, that nobody faced same problems as I do, because I am using quite trivial configuration without success, so maybes somebody can share experience with pam_smbpass under Solaris or help me identify what's wrong with it ?

So finally I wrote my own pam authentication module to check how pam_smbpass really works. I see no problems no with module load as in my previous letter(well, only with this my program, not with telnetd or ftpd). But now I found another problem. In syslog file I see :

Oct 24 17:26:37 local PAM_smbpass[13820]: [ID 743889 auth.debug] username [a0796999] obtained
Oct 24 17:26:37 local PAM_smbpass[13820]: [ID 772098 auth.alert] Cannot access samba password database

And I have no idea why. Truss output show :

13821:  write(8, " O c t   2 4   1 7 : 2 6".., 66)      = 66
13821:  close(8)                                        = 0
13821:  _exit(0)
13820:  waitid(P_PID, 13821, 0xFFBEEEA8, 0403   )       = 0
13820:  sigprocmask(SIG_SETMASK, 0xFFBEEF8C, 0x00000000) = 0
13820:  fstat(3, 0xFFBEFA70)                            = 0
13820:  close(3)                                        = 0
13820:  sigaction(SIGPIPE, 0xFFBEFA98, 0xFFBEFB1C)      = 0
13820:  time()                                          = 1067009197
13820:  umask(022)                                      = 022
13820:  open64("", O_WRONLY|O_APPEND|O_CREAT, 0644)     Err#2 ENOENT
13820:  umask(022)                                      = 022
13820:  umask(022)                                      = 022
13820:  open64("", O_WRONLY|O_APPEND|O_CREAT, 0644)     Err#2 ENOENT
13820:  umask(022)                                      = 022
13820:  fstat(-1, 0xFFBEFA70)                           Err#9 EBADF
13820:  fstat(-1, 0xFFBEEEA0)                           Err#9 EBADF
13820:  open("/dev/conslog", O_WRONLY)                  = 3
13820:  fcntl(3, F_SETFD, 0x00000001)                   = 0
13820:  fstat(3, 0xFFBEEEA0)                            = 0
13820:  fstat(3, 0xFFBEF900)                            = 0
13820:  time()                                          = 1067009197
13820:  getpid()                                        = 13820 [13819]
13820:  putmsg(3, 0xFFBEEFB8, 0xFFBEEFAC, 0)            = 0
13820:  open("/var/run/syslog_door", O_RDONLY)          Err#2 ENOENT
13820:  sigprocmask(SIG_BLOCK, 0xFFBEEF9C, 0xFFBEEF8C)  = 0
13820:  fork()                                          = 13823
13823:  fork()          (returning as child ...)        = 13820
13823:  sigaction(SIGALRM, 0xFFBEEE68, 0xFFBEEEE8)      = 0
13823:  sigprocmask(SIG_BLOCK, 0x00000000, 0xFFBEEF9C)  = 0
13823:  sigprocmask(SIG_SETMASK, 0xFFBEEF9C, 0x00000000) = 0
13823:  alarm(5)                                        = 0
13823:  open("/dev/sysmsg", O_WRONLY)                   = 8
13823:  alarm(0)                                        = 5
13823:  write(8, " O c t   2 4   1 7 : 2 6".., 75)      = 75

pam_smbpass tries to open file with empty file name : open64("", O_WRONLY|O_APPEND|O_CREAT, 0644). No surprise, that it returns error about problem to open this file. 

Strings in pam module show correct filename for smbpasswd :

# strings /usr/lib/security/pam_smbpass.so | grep "private/smbpasswd"
/opt/local/samba/private/smbpasswd

File smbpasswd exists on system. smbpasswd (compiled together with pam_smbpass) command works without problems :

# ./smbpasswd -a martynas
New SMB password:
Retype new SMB password:
# ls -al /opt/local/samba/private/smbpasswd
-rw-------   1 root     other        108 Oct 24 17:34 /opt/local/samba/private/smbpasswd



What can be wrong ? Thank you in advance for your help.


With best regards
Martynas 


More information about the samba mailing list