Adding a feature to the smbd

Richard Sharpe sharpe at
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):
>        source environment = |/usr/local/samba/bin/ %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
>[script start]
>case $ip in
>  129.241.56)
>        myENV=%H/.profil
>        ;;
>  129.241.151)
>        myENV=%H/privat
>        ;;
>  *)
>        myENV=%H
>        ;;
>/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?

Richard Sharpe, sharpe at
Samba (Team member,, Ethereal (Team member,
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba

More information about the samba-technical mailing list