[Samba] netlogon.bat issues

Dale Schroeder dale at BriannasSaladDressing.com
Thu Aug 20 12:43:05 MDT 2009


David,

Your netlogon share is more complicated than most.
Consider initially commenting out all the mask and mode parameters and 
the valid users parameter.
If it then works, add them back one at a time until it breaks.

Depending on what the global preexec script does, you may want to 
initially disable that also.

Check that the execute bit is set on the .bat files.  I used 755 
permissions with root:root ownership.
Check the permissions throughout the entire netlogon path 
(/mnt/samba/netlogon).
Were the files created in a DOS/Windows editor?

Dale


David Christensen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David Christensen wrote:
>   
>> I have samba configured so that users have their own netlogon.bat file
>> (e.g. %U.bat) and each user has a .bat with their username in the
>> netlogon share.
>>
>> So far I have been unable to get any of the shares that I have defined
>> in the batch file to be mounted when a user logs in.  Here is a snapshot
>> of both the netlogon section of my smb.conf file and the %U.bat file I
>> am using:
>>
>> smb.conf:
>>
>> [global]
>> .......
>> preexec = /usr/local/bin/netlogon %U
>> logon script = %U.bat
>> logon home = \\%L\%U\.profiles
>> logon path = \\%L\profiles$\%U
>> logon drive = Z:
>>
>> ........
>>
>> [netlogon]
>> path = /mnt/samba/netlogon
>> admin users = root, Administrator, Admin
>> valid users = %U
>> read only = no
>> browsable = no
>> create mask = 0770
>> force create mode = 0060
>> create directory mask = 0770
>> force directory mode = 0070
>> security mask = 0777
>> directory security mask = 0777
>>
>> %U.bat:
>> @echo off
>> REM # In this example it is assumed the smb.conf handles home drive mapping
>> REM # All users get access to Common drive
>> net use Y: \\192.168.155.20\common
>>
>>
>> REM # Lastly lets set the davidc's time to 192.168.155.20's time
>> net time \\192.168.155.20 /set /yes
>>     
>
> Updated info
>
> The user can run the batch file manually from the netlogon share, so the
> issue seems to be with it running automatically, is there any logs that
> would capture an attempt to execute this file?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkqNhR4ACgkQ5B+8XEnAvquZCwCfcTAt+U42bdHe2B2+3MmmH/Lh
> W3YAn1r5esG75qWSOLrcoZseuHeuL1SJ
> =1Ir4
> -----END PGP SIGNATURE-----
>   


More information about the samba mailing list