[Samba] SAMBA-LDAP and variable substition
harry_rueter at gmx.de
Wed Jun 26 06:51:02 GMT 2002
werner maes wrote:
> >Have you looked into the logfiles ?
> >Are you sure, that samba does variable substition
> >on the value it gets from LDAP ?
> samba gets this (as found in the logfile):
> [2002/06/26 12:37:15, 2] passdb/pdb_ldap.c:get_single_attribute(360)
> get_single_attribute: [scriptPath] = [scripts\%m.bat]
Yes, and it seems not to be substituted.
Has it ever been substituded or is it a behaviour
you'd like to have ?
> >Why don't you use logon script = scripts\%m\pc.bat ?
> >This will do it too ...
> >You can do anything with the "logon script"-entry ,
> >specifying per user and per machine and per OS !!!
> >example :
> >logon script scripts\%m\%u\%a\pc.bat
> >If xou're using Winxp, user is werner, machine is mymachine
> >it would be :
> >logon script scripts\mymachine\werner\win2K\pc.bat
> Because %m is NOT translated to a machinename when this variable is stored
> in the scriptPath variable in LDAP. That's the whole problem !
Why not forgetting scriptpath in LDAP and letting samba do
whole substitution ?
> And for Win2000-WinXP you must use this variable.
You mean scriptpath in LDAP ?
I'm using W2k without an it works.
Another solution is to use
"root preexec" in netlogon.
The script called there has access to all %-Variables and
can generate a suitable logon-script ..
That's what i do ...
> Or are you having a configuration with Samba and LDAP authentication where
> the Win2000 clients use the "logon script" parameter?
Yes i have.
You should give it the whole path of the script.
More information about the samba