Adding a feature to the smbd

Simo Sorce simo.sorce at polimi.it
Sun Jan 21 16:47:26 GMT 2001


On Sun, 21 Jan 2001, Thomas Langås wrote:

> Richard Sharpe:
> > >Don't mind my last posting :)  I found the part I think you're refering too,
> > >it was called sys_popen();  I've included that now... Should I send the
> > >diff-file to the list?
> > Please do ... And a short description of what it is intended for, including
> > examples if you can ... It may be that there is an existing mechanism that
> > can do the job.
>
> Ok, this whole thing started when we decided to transfer our
> Windows-profiles for each users from profile-server to our samba-servers.
> Since we have a lot of computer labs, and a lot of them have different
> programs installed, you can't have the same profile in each lab. So, it was
> one of two things, either have different profile-shares for each lab, or
> have one share and let samba do the job selecting which path you should get
> as your profile-dir. This was when I decided to create a feature I called
> "enhanced path=", it's an option in the shares-config. Instead of sending
> "path=" you set "enhanced path=". The value in "enhanced path=" is a
> program/shell-script that sends a line of text to stdout, smbd then reads
> this output and uses this output as the "path=" string (it set's the
> .szPath-string, actually). I'm using standard_sub_basic on the value passed
> with "enhanced path=" so that you can use %I, %M, etc. to achieve the wanted
> dynamic configuration. I asked on the reg. samba list before doing this
> patch, and no one seemed to think of a solution that could do this with
> todays options.
>
>

Unfortunately, I've not seen your question.
I think you may do the same thing without that script.
Basically make the profiles share have path = /path/with/%I/in/
This way any machine has a different profile, but if you need
the same profile for a group of machine you may simply create one
real directory (the first IP) and let the others (IPs) be simple links.
I hope I've understanded your problem.

Anyway this patch maybe usefull for other purposes, as for example a time
based profile switching, here I'm thinking of a shared computer classroom
with different software needs, etc....


Simo.

-- 
Simo Sorce - Linux Systems Consultant
E-mail: simo.sorce at polimi.it
Tel: +39 0348 7149179 - Fax: +39 02 700442399
-----------------------------------------------------------------
Be happy, use Linux!





More information about the samba-technical mailing list