[Samba] Weird: cron or sendmail don't work properly after I installed winbind

Hannes Schmidt mail at schmidt-net.via.t-online.de
Wed Jul 24 11:36:01 GMT 2002


Hi,

I have been staring at this problem for hours now and I am about to throw in the towel ...

On monday I installed winbind (Samba 2.5.5) on my Suse 7.2 Linux file server, and everything 
seemed to work fine. Today I noticed though, that I didn't get any mail notifications from the cron jobs that run on that server. After hours of investigation I can provide the following diagnostics:

(1) The cron job hangs as does its sendmail child to which it pipes its output to; that is, ps -x gives this

 1331 ?        S      0:00 /USR/SBIN/CRON
 1333 ?        S      0:00 /usr/sbin/sendmail -FCronDaemon -odi -oem admin at laika.zup.bln.de

(2) When I copy the command line from the above ps output and execute the command interactively within the shell, sendmail terminates properly and the mail arrives as expected.

(3) When I do a killall sendmail, I get *weird* output in /var/log/mail:

Jul 24 19:49:46 lola sendmail[1333]: g6OHg0L01333: from=root, size=0, class=0, nrcpts=1, relay=[[UNIX: /tmp/.winbindd/pipe]]

It's the windbindd/pipe thing that looks very suspicious to me, because usually you would expect something like

..., relay=root at localhost 

Bottom line: It seems that somehow some file handles get all mixed up when winbind is used. 
I did an strace of the cron daemon and the trace of the child that becomes the actual cron-job is most interesting - there is no close() on the unix socket handle for /tmp/.winbindd/pipe. This is the head of the strace:

getpid()                                = 1017
time([1027529160])                      = 1027529160
getpid()                                = 1017
rt_sigaction(SIGPIPE, {0x400ee270, [], 0x4000000}, {SIG_DFL}, 8) = 0
send(9, "<78>Jul 24 18:46:00 /USR/SBIN/CR"..., 66, 0) = 66
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
close(9)                                = 0
setsid()                                = 1017
close(2)                                = 0
close(7)                                = 0
close(0)                                = 0
dup2(1, 0)                              = 0
close(1)                                = 0
dup2(10, 1)                             = 1
close(2)                                = -1 EBADF (Bad file descriptor)
dup2(1, 2)                              = 2
close(1)                                = 0
close(10)                               = 0
msgctl(0, MSG_???, 0x40133fd0)          = 0
uname({sys="Linux", node="lola", ...})  = 0
open("/etc/group", O_RDONLY)            = 1
shmat(1, 0xbffff200, 0x1)               = ?
shmat(1, 0xbffff200, 0x2)               = ?
fstat64(1, {st_mode=S_IFREG|0644, st_size=692, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
_llseek(1, 0, [0], SEEK_CUR)            = 0
read(1, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 692
read(1, "", 4096)                       = 0
close(1)                                = 0
munmap(0x40017000, 4096)                = 0
getpid()                                = 1017
getpid()                                = 1017
close(0)                                = 0
getpid()                                = 1017
lstat64("/tmp/.winbindd", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/tmp/.winbindd/pipe", {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 0
connect(0, {sin_family=AF_UNIX, path="                                                                                         /tmp/.winbindd/pipe"}, 110) = 0
select(1, [0], NULL, NULL, {0, 0})      = 0 (Timeout)
write(0, "\30\5\0\0\5\0\0\0\371\3\0\0root\0\0\0\0\0\0\0\0\0\0\0\0"..., 1304) = 1304
read(0, "\24\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1300) = 1300
ipc_subcall(0x7, 0x804e5a0, 0x401364a0, 0x804e5a0) = 0
msgget(IPC_PRIVATE, 0x2|02)             = 0
chdir("/root")                          = 0
execve("/bin/sh", ["/bin/sh", "-c", "/bin/ls -l"], [/* 5 vars */]) = 0
...





More information about the samba mailing list