[GLLUG] Samba - root preexec & login scripts

Sean picasso@madflower.com
Tue, 29 Oct 2002 08:39:37 -0500 (EST)


Im far from a guru and therefore maybe slightly confused, but I thought
the preexec script had to be .bat or .cmd files AND if it needed to be run
at boot it also needed to be in the registry. The reason for the .bat 
files was simply because no other interpreter would be loaded at the time.

I was also under the impression that with the preexec scripts were run 
after the drives were mounted but right before they were usuable by the 
user. kind of like an autorun script on a cd. 

I am also kind of wondering if LDAP might offer a better solution. 

Sean 


On Tue, 29 Oct 2002, Mike Rambo wrote:

> 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.
> 
> 
>