[Samba] Samba "%G" replacement not working in "Logon script" ?
Denis BUCHER
dbucherml at hsolutions.ch
Sat Dec 20 18:06:46 MST 2014
P. S. I tried to display %ACCOUNTNAME% and %WORKGROUP% in cmd.exe on a
logged PC (User in domain, roaming profile) but both values were unset :
> echo %ACCOUNTNAME%
>
> %ACCOUNTNAME%
Denis
Le 21.12.2014 01:25, Denis BUCHER a écrit :
> Dear Ricky,
>
> Thanks a lot for your answer. But I still have two problems:
>
> 1. I am not using samba as AD DC but as PDC.
>
> 2. What I would need is the primary group... Do you thinks %WORKGROUP%
> could work ?
>
> 3. And should I use %WORKGROUP% in smb.conf or in batch login script...
>
> Thanks a lot in advance for your help...
>
> Denis
>
> Le 18.12.2014 21:58, Ricky Nance a écrit :
> Dennis, if you are running samba as an AD DC, you will need to use the new variable names %ACCOUNTNAME% and %WORKGROUP%. Ricky On Tue, Dec 16, 2014 at 1:23 PM, Denis BUCHER <dbucherml at hsolutions.ch>wrote: Dear all, I experience now a strange bug with Samba 4.1.11 : When I define a fixed-name as logon script in smb.conf, it works : logon script = employee.bat But if I try either %g.bat or %G.bat, or even "%G.bat", it doesn't work : * logon script = %g.bat * logon script = %G.bat * logon script = "%G.bat" In the logs, there was a message showing that Samba was trying to open the "%G.bat" file and that the file was not found on the disk. (Of course) Denis P.S. Logfiles: [2014/11/21 20:53:36.616573, 5] ../source3/smbd/filename.c:258(unix_convert) unix_convert called on file "%g.bat" [2014/11/21 20:53:36.616622, 5] ../source3/smbd/filename.c:421(unix_convert) unix_convert begin: name = %g.bat, dirpath = , start = %g.bat [2014/11/21 20:53:36.616705, 5]
../source3/smbd/filename.c:816(unix_convert) New file %g.bat [2014/11/21 20:53:36.616747, 3] ../source3/smbd/vfs.c:1137(check_reduced_name) check_reduced_name [%g.bat] [/data/shares/netlogon] [2014/11/21 20:53:36.616794, 3] ../source3/smbd/vfs.c:1267(check_reduced_name) check_reduced_name: %g.bat reduced to /data/shares/netlogon/%g.bat [2014/11/21 20:53:36.616838, 5] ../lib/dbwrap/dbwrap.c:187(dbwrap_check_lock_order) check lock order 1 for /var/run/samba/smbXsrv_open_global.tdb [2014/11/21 20:53:36.616906, 5] ../lib/dbwrap/dbwrap.c:146(dbwrap_lock_order_state_destructor) release lock order 1 for /var/run/samba/smbXsrv_open_global.tdb [2014/11/21 20:53:36.616950, 5] ../source3/smbd/files.c:128(file_new) allocated file structure fnum 2158460712 (2 used) [2014/11/21 20:53:36.616995, 3] ../source3/smbd/dosmode.c:163(unix_mode) unix_mode(%g.bat) returning 0744 [2014/11/21 20:53:36.617034, 5] ../source3/smbd/open.c:2168(open_file_ntcreate) open_file_ntcreate: FILE_OPEN requested f
or file
%g.bat and file doesn't exist. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba [1] [1]
Links:
------
[1] https://lists.samba.org/mailman/options/samba [1]
Links:
------
[1] https://lists.samba.org/mailman/options/samba
More information about the samba
mailing list