[Samba] Win7 login script not running

samba1 at nym.hush.com samba1 at nym.hush.com
Fri Jan 24 07:01:51 MST 2014

I’ve got a 4.1.3 Samba PDC Server on Debian Wheezy.  It’s running 
in Classic mode – all existing clients are Windows XP Pro.

I’m installing a Windows 7 Pro 64-bit PC, and have managed to join 
it to the domain, but can’t get the user’s login script to run.  
The login scripts work fine on XP.

The pertinent sections of smb.conf contain:

logon script = %U.bat
logon drive = G:

path = /home/netlogon
locking = no
guest ok = no
root preexec = /home/netlogon/loginscript.pl %U %M %m
root postexec = /home/netlogon/logoutscript.pl %U %M %m
read only = yes
browseable = no
veto files = /*.pl/

I’ve tried changing things such as the ‘read only’ and ‘guest ok’ 

The login script for the user is being created in /home/netlogon.  
It’s also being removed when the PC is shut down.

I’ve tried a few registry entries including:

	DomainCompatibilityMode DWORD 1
	DNSNameResolutionRequired DWORD 0

	RequireSignOrSeal DWORD 1
	RequireStrongKey DWORD 0

	RunLogonScriptSync DWORD 1

	SyncForegroundPolicy DWORD 1

I also set the LanManager Authentication Level to LM & NTLM 

Drive G: is being mapped to the user’s home directory.  I also 
placed a copy of the login script there (in case it was trying to 
run from there rather than from the netlogon share.

I can map drives manually, and access the shares – I just can’t get 
the login script to execute.

Thanks very much.

More information about the samba mailing list