The Samba-Bugzilla – Bug 417
Variables don't work in include lines
Last modified: 2005-11-14 09:27:50 UTC
I use different shares depending on the group of the person connecting. This
changes what share can be seen by the users group. Everything worked fine
until implementing this. For instance, I created a group called admins and
added myself to this group. I made a file called /etc/samba/smb.conf.admins
with shares an admin should see. I added this line to the end of globals
After doing this, shares showed up blank. (I of course restarted samba.)
After hitting refresh a few times, the shares showed up. I then went into one
and it worked ok. After a bit, the shares dissapeard again and windows
reported, "The network path was not found." After hitting F5 a few times, it
says the server cannot be found now, after hitting refresh a few more times
the shares are back... for a little bit.
Server OS: Gentoo Linux 1.4
Samba config: Samba 3.0.0rc2 Set up as primary domain controler (use to be
Client OS: Windows XP SP1
Briwsing is done as the guest user. So your
include line will expand %G to the group of the
If you have at least 1 connection to the server as
an authenticated user prior to browsing the include
line will show up correctly. There is nothing that
can be done about this from what I can tell.
report via email is that thius worked fine under 2.2.8a
More reports from the mailing list:
if i wrote in smb.conf that string - include=/etc/samba/%U.conf this not work
in log this value "file /etc/samba/%U -> file /etc/samba"
in operator "include" work only one macros %L
other macros - %U %u %G %g not work.
reseting target milestone. 3.0.1 has been frozen. WIll have to
I have been using samba since 2.07, am now using 2.2.8a, and have also noticed
this error in the SAMBA3 base.
smb.conf contains "include=/etc/samba/user.%U", which works in the SAMBA2 base,
but fails to find "/etc/samba/user." in the SAMBA3 base (3.0, 3.0.1, and 3.0.2).
Interestingly, a test share with "comment = u %u U %U D %D g %g H %H" shows the
right information with "smbclient -L servername -U username".
Also interesting: "include=/etc/samba/server.%L" works in both SAMBA2 and SAMBA3.
I see these results on any of my windows PCs and with smbclient requests.
Based on my testing, this is the only thing keeping me from moving from 2 to 3.
At present the samba server is set to "security=server" with a different (samba)
I can provide any detail you wish.
*** Bug 961 has been marked as a duplicate of this bug. ***
Finally tracked this down. It's kind of widespread
in that the current_user_info struct seems to have
fallen into disuse. I have a working patch but I
need to make sure that it is a complete patch before
checking it in.
Created attachment 448 [details]
patch for fix %UuGg variable expansion in smb.conf
This patch fixes up the mess with inconsistency surrounding
the current_user_info global var. Fixes variables and include files.
changes checked into 3.0 and HEAD cvs trees. SOrry
for all the hassle on this.
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.