[Samba] %S not resolving in smb.conf file

flinchlock crazening at ml1.net
Tue May 4 11:25:37 GMT 2004


Quoting Tim Booher <tbbooher at cox.net>:

> Any thoughts why %S is not resolving? is there anyway to echo
> these
> variables (other than putting them in a comment = %S in a share)

I have this line in the GLOBAL section of my smb.conf:
	exec = /home/netlogon/smbvars "%m" "%M" "%I" "%a" "%D" "%u" "%H"
"%g" "%U" "%G" "%S" "%P" "%p" "%h" "%L" "%N" "%v" "%d" "%R" "%T" >
%H/%S.vars

Here is my VERY SIMPLE smbvars script:
-------------------------------------------------------------
echo Client variables...
echo %m = "$1" = "Client's NetBIOS name"
echo %M = "$2" = "Client's DNS name"
echo %I = "$3" = "Client's IP address"
echo %a = "$4" = "Client's architecture"
echo
echo User variables...
echo %D = "$5" = "User's Windows NT Domain"
echo %u = "$6" = "User's Unix username"
echo %H = "$7" = "Home directory of %u"
echo %g = "$8" = "Primary group of %u"
echo %U = "$9" = "Requested username"
echo %G = "${10}" = "Primary group of %U"
echo
echo Share variables...
echo %S = "${11}" = "Current share's name"
echo %P = "${12}" = "Current share's root directory"
echo %p = "${13}" = "Current share's root directory (in an NIS
homedir map)"
echo
echo Server variables...
echo %h = "${14}" = "Samba server's DNS name"
echo %L = "${15}" = "Samba server's NetBIOS name"
echo %N = "${16}" = "NIS home directory server (without NIS, same as
%L)"
echo %v = "${17}" = "Samba version"
echo %d = "${18}" = "Current server's process ID"
echo
echo Miscellaneous variables...
echo %R = "${19}" = "SMB protocol level in use"
echo %T = "${20}" = "Current date and time"
-------------------------------------------------------------

HTH,

Mike


More information about the samba mailing list