By Robert Eckstein, David Collier-Brown, Peter Kelly
Cover | Table of Contents
global]
appears before its name in the following reference section. Any lists
mentioned are space-separated, except where noted. A glossary of
terms and a list of variables Samba recognizes follow this reference
section.
%u value (username) as the argument to the script.
Requires security =
server or security
= domain. See also
delete user script.
hosts deny option. Synonym for
hosts allow.
security = server or
security =
domain.
(*.html *.htm).
192.168.2.255/SERVERS 192.168.4.255/STAFF
/.*/fred flintstone/*.frk/
@group_name includes
whomever is in the NIS netgroup group_name
if one exists, or otherwise whomever is in the Unix group
group_name. In addition,
+group_name is a Unix
group, &group_name is an NIS netgroup,
and &+ and +& cause an ordered search of both Unix and NIS
groups.
|
Name
|
Meaning
|
|---|---|
%a |
Client's architecture (Samba, WWfg, WinNT, Win95, or UNKNOWN)
|
%d |
Current server process's process ID
|
%f |
Print-spool file as a relative path (printing only)
|
%f |
User from which a message was sent (messages only)
|
%G |
Primary group name of
%U (requested username) |
%g |
Primary group name of
%u (actual username) |
%H |
Home directory of
%u (actual username) |
%h |
Samba server's (Internet) hostname
|
%I |
Client's IP address
|
%j |
Print job number (printing only)
|
%L |
Samba server's NetBIOS name (virtual servers have multiple
names)
|
%M |
Client's (Internet) hostname
|
%m |
Client's NetBIOS name
|
%N |
Name of the NIS home directory server (without NIS, same as
%L)
|
%n |
New password (password change only)
|
%o |
Old password (password change only)
|
%P |
Current share's root directory (actual)
|
%p |
Current share's root directory (in an NIS homedir map)
|
%p |
Print filename (printing only)
|
%R |
Protocol level in use (CORE, COREPLUS, LANMAN1, LANMAN2, or NT1)
|
%S |
Current share's name
|
%s |
Name of file the message is in (messages only)
|
%s |
Print-spool file name (printing only)
|
%T |
Current date and time
|
%t |
Destination machine (messages only)
|
%U |
Requested username for current share
|
%u |
Current share's username
|
%v |
Samba version
|
-D-d debug_level-h -a-o, and is the default.
-i scope/usr/local/samba/bin/smbd -D /usr/local/samba/bin/nmbd -D
#!/bin/sh
#
# /etc/rc2.d./S91Samba --manage the SMB server in a
# System V manner
#
OPTS="-D"
#DEBUG=-d3
PS="ps ax"
SAMBA_DIR=/usr/local/samba
case "$1" in
'start')
echo "samba "
$SAMBA_DIR/bin/smbd $OPTS $DEBUG
$SAMBA_DIR/bin/nmbd $OPTS $DEBUG
;;
'stop')
echo "Stopping samba"
$PS | awk '/usr.local.samba.bin/ { print $1}' |\
xargs kill
;;
'status')
x=`$PS | grep -v grep | grep '$SAMBA_DIR/bin'`
if [ ! "$x" ]; then
echo "No samba processes running"
else
echo " PID TT STAT TIME COMMAND"
echo "$x"
fi
;;
'restart')
/etc/rc2.d/S91samba stop
/etc/rc2.d/S91samba start
/etc/rc2.d/S91samba status
;;
*)
echo "$0: Usage error -- you must say $0 start, \
stop, status or restart ."
;;
esac
exitps
options to suit the machine you're using. In addition, you
might want to add commands to tell Samba to reload its
smb.conf file or dump its
nmbd tables, depending on your actual needs.
dig(1).This is useful for
looking up normal NetBIOS names as well as the odd ones, like
_ _MSBROWSE_ _ , that the Windows name services
use to provide directory-like services. If you wish to query for a
particular type of NetBIOS name, add the NetBIOS
<type> to the end of the name.
nmblookup [options] name
-A-B broadcast_address-d debug_level-h-i scope-M_ _MSBROWSE_ _ , and then asking that machine for
information, instead of broadcasting the query itself.
-R-r-SReturn to Samba Pocket Reference