Configuring user details via include %U

Benjamin Kuit bj at it.uts.edu.au
Tue Dec 18 17:55:01 GMT 2001


In a previous version of samba, we wanted to have the majority of
users getting the same profile, with one or two people getting
their profiles in a totally different location, similar to this:

logon path = \\%N\Profiles\%U for most users

logon path = "" ; (empty string) for administrators

Problem is that you can't do reliably.

One could assume that you could do this using smb.conf paramaters like
include %U.conf, and in the individual config files you would set
logon path = "", changing the smb.conf default.

But where lp_logon_path is used (in pdb_smbpasswd.c in my config),
samlogon_user is updated (changing %U), but the paramater list is
not reloaded.

When the paramaters were last reloaded, %U would be "", so include %U.conf
becomes include .conf, and logon_path stays as the pattern \\%N\Profile\%U.
When samlogon_user is updated, the "include %U.conf" statement isn't 
re-evaluated, so logon_path remains to be the pattern "\\%N\Profile\%U".

One solution is to call reload_services() after sam_logon_in_ssb = True,
and reloaded again after sam_logon_in_ssb reset to False?

I haven't tested that theory, so I dont know if it'll work, but I would
imagine that there would be a performance hit from two extra config
reloads.

Ideas?

Bj

-- 
+-------------------------------+--------------------------------------+
|      Benjamin (Bj) Kuit       |  Building 4, 447                     |
|      Systems Programmer       |  Faculty of Information Technology   |
|      Phone: 02 9514 1841      |  University of Technology, Sydney    |
|      Mobile: 0416 184 972     |  Email: bj at it.uts.edu.au             |
+-------------------------------+--------------------------------------+




More information about the samba-technical mailing list