Problems when using %G, %g or other substitutions in include =
Philippe Höij
philippe.hoij at solidx.nu
Mon Dec 17 08:34:05 GMT 2001
Hi developers
I hope that this is the correct list for the question, as it appears to be a
bug in samba >= 2.2.1a
The problem is that the "include =" directive only seems to take "%m" as a
substitution on late samba-packages( tested on 2.2.1a and 2.2.2 on Linux
2.4.7-10, RedHat 7.2), not for instance %g, %u, %G or %U, there are
certainly more that doesn't work.
On the net I've seen a similar problem, which seems to be a ?bug? in the
function
standard_sub_advanced() as suggested by Jerry posted Wed Oct 17 13:00:05
2001 by Gerald (Jerry) Carter (jerry at samba.org) :
>These are handled by a call to standard_sub_basic()
>while %[gG] is handled by standard_sub_advanced().
>I'll look into it.
The whole message is at
http://lists.samba.org/pipermail/samba/2001-October/059176.html
Is there a patch for 2.2.2 to enable the ?correct? behaviour or at least the
behaviour :-)
Or are you investigating in why it is like this?
Errors from testparm when I run it on my config file:
-snip-------------------------------------------------------------------
Load smb config files from /etc/samba/smb.conf
Can't find include file /etc/samba/smb.conf.group-%G
Can't find include file /etc/samba/smb.conf.group-%g
Processing section "[homes]"
Processing section "[printers]"
Processing section "[test]"
Loaded services file OK.
Press enter to see a dump of your service definitions
-snap-------------------------------------------------------------------
My config file for testing is at the bottom of the mail.
mvh
Philippe Höij
...................................................
: | :
:Philippe Höij, SolidX AB | Dir: +46 40 630 16 63 :
:Scheelegatan 9 | Mob: +46 733 99 16 63 :
:212 28 Malmö | Tel: +46 40 630 16 60 :
:Sweden | Fax: +46 40 18 67 07 :
:------------------------- ------------------------:
:philippe.hoij_at_solidx.nu | http://www.solidx.nu :
...................................................
-snip-------------------------------------------------------------------
# Global parameters
[global]
workgroup = SOLIDX
netbios name = LABB1
server string = Samba Server
encrypt passwords = Yes
# map to guest = Bad User
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
printing = lprng
include = /etc/samba/smb.conf.group-%G
include = /etc/samba/smb.conf.group-%g
log level = 2
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[test]
path = /tmp/nisse
-snap-------------------------------------------------------------------
More information about the samba-technical
mailing list