[GLLUG] Samba - root preexec & login scripts

Mike Rambo mrambo@lsd.k12.mi.us
Tue, 29 Oct 2002 08:17:46 -0500


Hey all,

For those of you familiar with Samba...

I've been trying to get dynamically created login scripts working for a
system I admin in Grand Ledge. I have a perl script that works from a
command prompt. It creates a login script for windows workstations that
sets the time and creates mapped shares based upon username and group
membership in /etc/group. As I said, it works from the command prompt
but I cannot get it to work automatically. Samba is set up as a domain
controller and works fine in that capacity. Manually created scripts are
run by the workstation at logon as they should. The relevent section of
my smb.conf is...

[netlogon]
   comment = Network Logon Service
   path = /home/netlogon
   guest ok = yes
   read only = yes
   browseable = no
   printable = no
   write list = @adm
   share modes = no
   root preexec = /home/netlogon/netlogon.pl %U
   root postexec = rm -f /home/netlogon/%U.bat

...but doesn't work. I get a 'no domain controller available' message
when I try to log in with the root preexec statement in place.
Commenting it out will allow the domain login to succeed. I have set log
level to 3 but do not see anything in the logs to indicate what is
failing. Someone on the samba list suggested to try log level 5 which
I'll do tonight but I wanted to see if gllug has any samba experts that
might know what I can look for on this. One final thing. While working
on this problem, one thing I've done is to upgrade from samba 2.2.3a to
the new 2.2.6 version. Since doing that the problem symptoms have
changed slightly in that when I get the no domain controller error in
2.2.6 I will also find a hung nmbd process on the server afterward. That
didn't happen under 2.2.3a. Perhaps that means something to someone...?

Thanks.


-- 
Mike Rambo
mrambo@lsd.k12.mi.us