[Samba] logon script and variables

Pascal Legrand pascal.legrand at univ-orleans.fr
Tue Sep 3 13:35:32 UTC 2019

Hello, a few years ago, I had encountered a problem regarding the 
inclusion of "%G" in logon script (logon script = %G.bat).
The logon script with %G" was not executed

I have this problem again with samba Version: 2:4.9.5+dfsg-5 on debian 
Is it the same bug?

For the moment i use this kind of script to use group definition :
logon script = logon.bat

logon.bat script :
@echo off
net user %username% /domain |find "globaux" > %temp%\1.txt
for /F "tokens=2 delims=*:" %%a in (%temp%\1.txt) do set group=%%a
call \\samba\netlogon\%group%.bat
del %temp%\1.txt

But i would prefere use the samba variables "%G"

Thank you for your help.

Pascal Legrand

More information about the samba mailing list