[Samba] passwd chat (own programm) won't work

"Stefan Völkel" <Stefan.Voelkel@millenux.com>"@samba.org "Stefan Völkel" <Stefan.Voelkel at millenux.com>" at samba.org
Tue Apr 1 20:38:27 GMT 2003


I would like to call a self written, non-interactive password change
script or programm.


  unix password sync = Yes
  passwd program = /opt/samba/pass %u
  passwd chat = Password\n%n\n *ok
  passwd chat debug = yes

a c test programm

#include <unistd.h>
#include <stdio.h>
#include <syslog.h>
int main(void)
        const int SIZE = 100;  
        char buf[SIZE];
        ssize_t i; 
        openlog("pass", LOG_PID, LOG_USER);
        i = read(0, buf, SIZE);
        buf[i] = 0;

        syslog(LOG_DEBUG, buf);
        return 0;

there appears no entry in the syslog :/.

so I tried a small shell script:


logger $1
echo Password
read PASS
logger -t pass $PASS

I can see the user in the syslog but no password.

loglevel is up at 100, but I can see no entries involving my

Any ideas?

Thanks in advance
Stefan Völkel                            stefan.voelkel at millenux.com
Millenux GmbH                              mobile: +49.170.79177.17
Lilienthalstraße 2                          phone: +49.711.88770.300
70825 Stuttgart-Korntal                       fax: +49.711.88770.349
     -= linux without limits -=- http://linux.zSeries.org/ =-

More information about the samba mailing list