Adding a feature to the smbd
Richard Sharpe
sharpe at ns.aus.com
Sun Jan 21 22:51:51 GMT 2001
At 11:17 PM 1/21/01 +0100, Simo Sorce wrote:
>On Mon, 22 Jan 2001, Richard Sharpe wrote:
>
>> >Where profilxxx was for each lab. This isn't actually a very good solution
>> >since we need to maintain a lot of shares. This is when I thought of
giving
>> >samba the ability of a dynamic-share, which resulted in the patch. So
after
>> >the weekend we're gonna start using this:
>> >
>> >\\sambaservers\profiles\%U%\%profiletype%
>> >
>> >Where the [profiles]-share will be a dynamic share.
>>
>> OK, now I understand ... This can actually be done with existing facilities
>> in Samba, in a two step process.
>>
>> In [profiles] you can use environment variables in the path:
>>
>> [profiles]
>> path = /some/path/%$(PROFILE_PATH)
>>
>> You set up a file in a root exec for the netlogon share, as you are
>> probably logging on ... and then you use the 'source environment' parameter
>> before the path parameter in your [profiles] share to read the environment
>> variable.
>>
>> If you want more info on using environment variables in macros, have a look
>> at Special Edition, Using Samba.
>>
>
>Well reading the man it seem you does not need even the root exec as
>you only need to set
>source environment = |/path/to/dynamic/profile/script.sh %I
>and let the script output environment variabile to standard output.
Well done Simo ... You are absolutely correct. I knew there was a simpler
way to do it ...
>--
>Simo Sorce - Linux Systems Consultant
Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba
More information about the samba-technical
mailing list