Samba 3.6.23-20 %G variable not working

Issues related to applications and software problems
Post Reply
kusic
Posts: 2
Joined: 2014/10/21 10:05:20

Samba 3.6.23-20 %G variable not working

Post by kusic » 2015/08/26 12:49:04

Hello,
after update from Samba 3.5 to Samba 3.6 (currently updated to latest stock 3.6.23-20), smb.conf parameter "logon script = %G.bat" is not working anymore.
I have been using group specific logon script, but now it is not possible.
%U variable works fine, but %G (primary group) does not.
Strange is, %G variable works in share sections but not in [global]

No side installs, only Centos6.5 repositories.

My smb.conf

Code: Select all

[global]

	workgroup = ORANGEFACTORY
	server string = Linux
	netbios name = BIGORANGE
	log level = 1
	log file = /var/log/samba/log.%m
	max log size = 100

	security = user
	passdb backend = tdbsam

	domain master = yes
	domain logons = yes

	logon script = %G.bat
	logon drive = o:

	add user script = /usr/sbin/useradd "%u" -g users
	add group script = /usr/sbin/groupadd "%g"
	add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
	delete user script = /usr/sbin/userdel "%u"
	delete user from group script = /usr/sbin/userdel "%u" "%g"
	delete group script = /usr/sbin/groupdel "%g"

	local master = yes
	os level = 128
	preferred master = yes

  wins support = yes
	name resolve order = wins lmhosts hosts bcast

	csc policy = disable
	max protocol = SMB2
 
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes

	map archive = no
	map hidden = no
	map read only = no
	map system = no
	username map = /etc/samba/smbusers
	store dos attributes = yes
	hide files = /profile/profile.V2/profile.V3/profile.V4/bin/desktop.ini/$Recycle.bin/
	map to guest = Bad User
	guest account = nobody

[homes]
	comment = Domaci slozka - test %G variable 
	browseable = yes
	writeable = yes
	valid users = %S, %D%w%S
	inherit acls = Yes

[netlogon]
	comment = Sitova sluzba netlogon
	path = /var/lib/samba/netlogon
	guest ok = yes
	writeable = no
	browseable = no

Post Reply