[Samba] Samba "%G" replacement not working in "Logon script" ?

Denis BUCHER dbucherml at hsolutions.ch
Tue Dec 16 12:23:26 MST 2014


 

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 for file %g.bat and file
doesn't exist.

 


More information about the samba mailing list