RHEL 6.5 problem with Samba variables in 'smb.conf' - variables are not being honored or respected or translated to its value
Hi,
got a strange problem - some (not all) variables used in samba config file 'smb.conf' are not translated to its values and are used as a string (or let's say text value).
[code]
samba.x86_64 3.6.9-164.el6
samba-client.x86_64 3.6.9-164.el6
samba-common.x86_64 3.6.9-164.el6
samba-winbind.x86_64 3.6.9-164.el6
samba-winbind-clients.x86_64 3.6.9-164.el6
samba4-libs.x86_64 4.0.0-58.el6.rc4
[/code]
for example, part in 'smb.conf' specifying netlogon scripts and user profiles location:
[code]
logon script = netlogon.bat
logon home = \%L\home\%U
logon path = \%L\profiles\%a
logon drive = H:
[netlogon]
path = /etc/samba/scripts/%g
[profiles]
path = /home/%U/windows_directory
[/code]
The "%L" should translate to server's NetBIOS name but it does not, resulting in not mapped user homes and profiles.
After i replace the "%L" with netbios server name it works (i have the netbios name specified in smb.conf ofc).
Also the "%a" does not work.
It creates (in my case) folder "%a.V2" (whole path /home/username/windows_directory/%a.V2) where expected behaviour would be eg. 'Vista.V2', referring to architecture of the client.
On the other hand the "%g" variable translates ok to user primary group with no problem.
Anyone has seen this? Tried to search it on Inet but not much turned out, except ppl having similar problems on Samba 4 where some variable names has been changed, but this is Samba 3 ... has there some variables been changed too?
Thanks!
Responses
My immediate thought would be that the variables with issues are preceded by a backslash '\' and it is being interpreted as an escape for the '%' (although the documentation example suggests whats you already have), but if %U works when you replace %L with the server name it would suggest this isn't the issue.
Have you attempted to use %N in place of %L?, documentation states they should behave the same if Samba wasn't built with autmount, but it may narrow down if it is specifically an issue with the %L variable.
logon home = \\%N\%U
Same goes for %a, have you tried substituting it with something else you know works for testing, eg. '%U' to narrow down if it is a specific issue with %a, or variables in general?
-edit-
Just noticed you are missing the leading '\\' before the server designation (not sure if this was stripped by the discussion forum, but guessing it was).
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
