AndyLiebman@aol.com
2005-Jan-23 15:32 UTC
[Samba] Samba PDC and Windows XP not executing logon.bat
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 itself. In the smb.conf file, relevant listings include: [global] ... 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 [netlogon] path = /etc/samba/netlogon read only = Yes browseable = No [profiles] 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
Pascal de Bruijn
2005-Jan-23 17:14 UTC
[Samba] Samba PDC and Windows XP not executing logon.bat
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have my netlogon share defined as such: [netlogon] ~ comment = Netlogon ~ path = /var/lib/samba/netlogon ~ guest ok = Yes ~ locking = No I think the 'guest ok part' might help you... I'm not 100% sure... Regards, Pascal de Bruijn AndyLiebman@aol.com wrote: | 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 | itself. | | In the smb.conf file, relevant listings include: | | [global] | ... | 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 | | [netlogon] | path = /etc/samba/netlogon | read only = Yes | browseable = No | | [profiles] | 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB89tvOauq/dYfFnQRAgCgAJ4s+Q34pPqCe1CcH5fMfMzejNVbEwCeNcw+ kajII6ow+7eKhw/yu9LnB8c=hVWK -----END PGP SIGNATURE-----
AndyLiebman@aol.com
2005-Jan-25 15:16 UTC
[Samba] Samba PDC and Windows XP not executing logon.bat
The "guest ok = Yes" line proved to be the secret to getting Windows XP to execute the logon.bat file. Thanks for the suggestion! Nowhere in any Samba documentation have I found that mentioned. It should be in the book. Thanks again, Andy Liebman -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I have my netlogon share defined as such: [netlogon] ~ comment = Netlogon ~ path = /var/lib/samba/netlogon ~ guest ok = Yes ~ locking = No I think the 'guest ok part' might help you... I'm not 100% sure... Regards, Pascal de Bruijn AndyLiebman@aol.com wrote: | 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 | itself. | | In the smb.conf file, relevant listings include: | | [global] | ... | 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 | | [netlogon] | path = /etc/samba/netlogon | read only = Yes | browseable = No | | [profiles] | 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
John H Terpstra
2005-Jan-26 06:51 UTC
[Samba] Samba PDC and Windows XP not executing logon.bat
On Tuesday 25 January 2005 08:16, AndyLiebman@aol.com wrote:> The "guest ok = Yes" line proved to be the secret to getting Windows XP to > execute the logon.bat file. Thanks for the suggestion! > > Nowhere in any Samba documentation have I found that mentioned. It should > be in the book.Are you planning to submit a patch or documentation update for the book? I will welcome it. - John T.