Bug 2687 - Problem with expansion of environment variables with ldapsam backend
Summary: Problem with expansion of environment variables with ldapsam backend
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.14a
Hardware: x86 Windows NT
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2005-05-07 08:44 UTC by Ottmar Kotheimer
Modified: 2019-06-18 10:33 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ottmar Kotheimer 2005-05-07 08:44:02 UTC
In Samba 3.0.11 expansion of variables like %L in the profile path, logon home
and logon script values when using either tdbsam or ldapsam was fixed.

But now the expansion of the environment variable %LOGONSERVER% is not working
anymore: If e.g. the server´s netbios name is SERVER, a sambaProfilePath entry
%LOGONSERVER%\profile\user now is expanded to SERVEROGONSERVER\profile\user and
not to \\SERVER\profile\user as desired.

Apparently the server just expands %L to the server´s netbios name, then appends
the reminder OGONSERVER  and does not recognize that the whole expression
%LOGONSERVER% is an environmental variable. I would expect, that all
environmental variables beginning with characters used in internal variables
(like L, U, N, etc.) will also be affected.

I was able to reproduce this behavior with samba 3.0.11 and 3.0.14a using
ldapsam. Samba 3.0.10 or older did not show this problem.
Comment 1 Karim Ayari 2005-05-18 01:55:34 UTC
With samba 3.0.14a, I have the same probleme with %Typesession% interpreted by
samba as <date of day>ypesession%.
Comment 2 Andrew Bartlett 2019-06-18 10:33:16 UTC
Modern Samba versions (including all supported versions eg 4.8 and above) have

'passdb expand explicit'

To control this. 

Fixed before commit b78eabbbc9e1a03d78e1a53621faab0cd40e6e37 in Samba 3.4