[Samba] Samba PDC and Windows XP not executing logon.bat

AndyLiebman at aol.com AndyLiebman at aol.com
Sun Jan 23 15:32:12 GMT 2005

I have spent most of the past 24 hours reading various samba docs and 
searching google for help -- but can't find a solution. Suggestions and solutions 
would be appreciated. 

I have set up a Linux Box (Samba 3.02) as a PDC with roaming profiles. (I 
haven't upgraded, because this box is a model for over 100 other boxes in the 
field). I can add XP users to the domain and their roaming profiles work great. 
However, I can't seem to get the logon.bat file to run when a user logs on. I 
can run it from the windows command line (using the file stored the linux box  
\\linuxbox\netlogon\logon.bat) -- and it does what it is supposed to do. But 
this file will not run automatically when logging on. 

I created the logon.bat file on a Windows Box and copied it over to the Linux 
Box (so the CR/LF thing should be fine). And of course the file runs from the 
Windows command line, so there shouldn't be anything wrong with the file 

In the smb.conf file, relevant listings include: 

security = user
domain master = Yes
preferred master = Yes
local master = Yes
domain logons = Yes
logon path = \\servername\Profiles\%U
encrypt passwords = Yes
logon script = logon.bat
time server = Yes

path = /etc/samba/netlogon
read only = Yes
browseable = No

path = /etc/samba/profiles
browseable = No
writeable = Yes
create mask = 0600
directory mask = 0700
;next line prevents desktop.ini from opening in Notepad upon logon
hide files = /desktop.ini/


A note on my smb.conf file. I originally set it up with the logon path = 
\\servername\Profiles\%U with an uppercase P in Profiles. 

Then I noticed that the share name "profiles" had a lower case "p". No I find 
that if I change the logon path so that "profiles" has a lowercase p, logons 
from all XP workstations fail. If I change it back to an uppercase P, all is 
well. Seems strange to me -- but Samba is often a black box. 

Help would be appreciated. 

Andy Liebman

More information about the samba mailing list