筍子工作雜記

七月 29, 2006

Samba 設定檔變數列表

Filed under: FreeBSD — shinnlu @ 8:12 下午

以下資料由 Samba 線上文件摘錄

%U
session username (the username that the client wanted, not necessarily the same as the one they got).

%G
primary group name of %U.

%h
the Internet hostname that Samba is running on.

%m
the NetBIOS name of the client machine (very useful).

This parameter is not available when Samba listens on port 445, as clients no longer send this information. If you use this macro in an include statement on a domain that has a Samba domain controller be sure to set in the [global] section smb ports = 139. This will cause Samba to not listen on port 445 and will permit include functionality to function as it did with Samba 2.x.

%L
the NetBIOS name of the server. This allows you to change your config based on what the client calls you. Your server can have a 「dual personality」.

%M
the Internet name of the client machine.

%R
the selected protocol level after protocol negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.

%d
the process id of the current server process.

%a
the architecture of the remote machine. It currently recognizes Samba (Samba), the Linux CIFS file system (CIFSFS), OS/2, (OS2), Windows for Workgroups (WfWg), Windows 9x/ME (Win95), Windows NT (WinNT), Windows 2000 (Win2K), Windows XP (WinXP), and Windows 2003 (Win2K3). Anything else will be known as UNKNOWN.

%I
the IP address of the client machine.

%i
the local IP address to which a client connected.

%T
the current date and time.

%D
name of the domain or workgroup of the current user.

%w
the winbind separator.

%$(envvar)
the value of the environment variable envar.

The following substitutes apply only to some configuration options (only those that are used when a connection has been established):

%S
the name of the current service, if any.

%P
the root directory of the current service, if any.

%u
username of the current service, if any.

%g
primary group name of %u.

%H
the home directory of the user given by %u.

%N
the name of your NIS home directory server. This is obtained from your NIS auto.map entry. If you have not compiled Samba with the –with-automount option, this value will be the same as %L.

%p
the path of the service’s home directory, obtained from your NIS auto.map entry. The NIS auto.map entry is split up as %N:%p.

無迴響 »

仍無迴響。

此篇文章迴響的訂閱源料 TrackBack URL

發表迴響

Powered by WordPress