Adding a feature to the smbd

Richard Sharpe sharpe at ns.aus.com
Thu Jan 25 23:10:30 GMT 2001


At 07:04 PM 1/25/01 +0100, Thomas Langås wrote:
>Richard Sharpe:
>> >Well, I've found it on the manpage!
>> >
>> >man smb.conf
>> >/source environment
>> No, we mean %$(envar) ... It is not where it should be. I have just
>> committed a fix to the smb.conf manpage source.
>> 
>
>Ok, what's wrong with this (from my share.conf-file):
>[protst]
>        source environment = |/usr/local/samba/bin/returnpath.sh %I
>        path = %${PROFILE_PATH}

[I understand that you have fixed the {} problem.
I can't see the problem, and must admit I have not tested this. However, I
would try the following to see what is going on:

Add a 'comment = %$(PROFILE_PATH)' and then browse the server from Windows
or use smbclient, and check what the comment says.
 
>This is the script:
>-rwxrwxr-x   1 root     root         390 Jan 25 18:39 returnpath.sh
>
>[script start]
>#!/bin/bash
>
>ip=$1
>ip=${ip%.*}
>case $ip in
>  129.241.56)
>        myENV=%H/.profil
>        ;;
>  129.241.151)
>        myENV=%H/privat
>        ;;
>  *)
>        myENV=%H
>        ;;
>esac
>
>/usr/bin/echo PROFILE_PATH=$myENV
>
>exit 0;
>[script end]
>
>I can't seem to find any errors here, but trying to mount this from my
>windows-box gives me an error... However mounting a share with my enhanced
>path-patch instead, works like a dream. Is there something I'm missing?
>
>-- 
>-Thomas
>

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