You should use this option very carefully, as any user in this list will be able to do anything they like on the share, irrespective of file permissions.
Default: no admin users
Example: admin users = jason
Default: announce as = NT
Example: announce as = Win95
Default: announce version = 4.2
Example: announce version = 2.0
If this is Yes then "read only" is set for files when the user write bit is not set.
The latter behaviour is useful when users copy files from each others directories, and use a file manager that preserves permissions. Without this option they may get annoyed as all copied files will have the "read only" bit set.
Default: alternate permissions = no
Example: alternate permissions = yes
Default: available = yes
Example: available = no
For name service it causes nmbd to bind to ports 137 and 138 on the interfaces listed in the 'interfaces' parameter. nmbd also binds to the 'all addresses' interface (0.0.0.0) on ports 137 and 138 for the purposes of reading broadcast messages. If this option is not set then nmbd will service name requests on all of these sockets. If "bind interfaces only" is set then nmbd will check the source address of any packets coming in on the broadcast sockets and discard any that don't match the broadcast addresses of the interfaces in the interfaces parameter list. As unicast packets are received on the other sockets it allows nmbd to refuse to serve names to machines that send packets that arrive through any interfaces not listed in the 'interfaces' list. IP Source address spoofing does defeat this simple check, however so it must not be used seriously as a security feature for nmbd.
For file service it causes smbd to bind only to the interface list given in the interfaces parameter. This restricts the networks that smbd will serve to packets coming in those interfaces. Note that you should not use this parameter for machines that are serving ppp or other intermittant or non-broadcast network interfaces as it will not cope with non-permanent interfaces.
Default: bind interfaces only = No
Example: bind interfaces only = Yes
Default: browseable = Yes
Example: browseable = No
Default: browse list = Yes
Default: case sensitive = No
See the discussion on NAME MANGLING.
Default: character set =
Example: character set = iso8859-1
This parameter co-operates with the valid chars parameter in determining what characters are valid in filenames and how capitalization is done. It has been added as a convenience for clients whose code page is either 437 or 850 so a convoluted "valid chars" string does not have to be determined. If you set both this parameter and the "valid chars" parameter the "client code page" parameter MUST be set before the "valid chars" in the smb.conf file. The "valid chars" string will then augment the character settings in the "client code page" parameter.
If "client code page" is set to a value other than those listed above, it will default to 850.
See also : valid chars.
Default: client code page = 850
Example: client code page = 437
If you want to set the string that is displayed next to the machine name then see the server string command.
Default: No comment string
Example: comment = Fred's Files
When a file is created, the neccessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a file. Any bit *not* set here will be removed from the modes set on a file when it is created.
The default value of this parameter removes the 'group' and 'other' write and execute bits from the UNIX modes.
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the force create mode parameter which is set to 000 by default.
For Samba 1.9.17 and above this parameter no longer affects directory modes. See the parameter directory mask for details.
See also the force create mode parameter for forcing particular mode bits to be set on created files. See also the directory mask parameter for masking mode bits on created directories.
Default: create mask = 0744
Example: create mask = 0775
This is useful to stop a server's resources being exhausted by a large number of inactive connections.
Most clients have an auto-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users.
Using this parameter with a timeout of a few minutes is recommended for most systems.
A deadtime of zero indicates that no auto-disconnection should be performed.
Default: deadtime = 0
Example: deadtime = 15
See the section on NAME MANGLING
Default: default case = lower
Example: default case = upper
This parameter specifies the name of a service which will be connected to if the service actually requested cannot be found. Note that the square brackets are NOT given in the parameter value (see example below).
There is no default value for this parameter. If this parameter is not given, attempting to connect to a nonexistent service results in an error.
Typically the default service would be a public, read-only service.
Also note that as of 1.9.14 the apparent service name will be changed to be that of the requested service, this is very useful as it allows you to use macros like %S to make a wildcard service.
Note also that any _ characters in the name of the service used in the default service will get mapped to a /. This allows for interesting things.
Example: default service = pub
[pub] path = /%S
This option may be useful for running applications such as rcs, where UNIX file ownership prevents changing file permissions, and DOS semantics prevent deletion of a read only file.
Default: delete readonly = No
Example: delete readonly = Yes
If this option is set to Yes, then Samba will attempt to recursively delete any files and directories within the vetoed directory. This can be useful for integration with file serving systems such as Netatalk, which create meta-files within directories you might normally veto DOS/Windows users from seeing (eg. .AppleDouble)
Setting 'delete veto files = Yes' allows these directories to be transparently deleted when the parent directory is deleted (so long as the user has permissions to do so).
Default: delete veto files = No
Example: delete veto files = Yes
See veto files
This setting allows the replacement of the internal routines to calculate the total disk space and amount available with an external routine. The example below gives a possible script that might fulfill this function.
The external program will be passed a single parameter indicating a directory in the filesystem being queried. This will typically consist of the string "./". The script should return two integers in ascii. The first should be the total disk space in blocks, and the second should be the number of available blocks. An optional third return value can give the block size in bytes. The default blocksize is 1024 bytes.
Note: Your script should NOT be setuid or setgid and should be owned by (and writable only by) root!
Default: By default internal routines for determining the disk capacity and remaining space will be used.
Example: dfree command = /usr/local/samba/bin/dfree
Where the script dfree (which must be made executable) could be
#!/bin/sh df $1 | tail -1 | awk '{print $2" "$4}'or perhaps (on Sys V)
#!/bin/sh /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'Note that you may have to replace the command names with full path names on some systems.
This parameter is the octal modes which are used when converting DOS modes to UNIX modes when creating UNIX directories.
When a directory is created, the neccessary permissions are calculated according to the mapping from DOS modes to UNIX permissions, and the resulting UNIX mode is then bit-wise 'AND'ed with this parameter. This parameter may be thought of as a bit-wise MASK for the UNIX modes of a directory. Any bit *not* set here will be removed from the modes set on a directory when it is created.
The default value of this parameter removes the 'group' and 'other' write bits from the UNIX mode, allowing only the user who owns the directory to modify it.
Following this Samba will bit-wise 'OR' the UNIX mode created from this parameter with the value of the force directory mode parameter. This parameter is set to 000 by default (ie. no extra mode bits are added).
See the force directory mode parameter to cause particular mode bits to always be set on created directories.
See also the create mask parameter for masking mode bits on created files.
Default: directory mask = 0755
Example: directory mask = 0775
Note that the maximum length for a NetBIOS name is 15 characters, so the DNS name (or DNS alias) can likewise only be 15 characters, maximum.
Default: dns proxy = yes
Default: domain controller = no
Default: domain logons = no
Default: domain master = no
Note that Samba can be very fussy about the exact format of the "dont descend" entries. For example you may need "./proc" instead of just "/proc". Experimentation is the best policy :-)
Default: none (i.e., all directories are OK to descend)
Example: dont descend = /proc,/dev
Default: dos filetimes = No
Example: dos filetimes = Yes
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares. If oplocks are enabled on a share, Visual C++ uses two different time reading calls to check if a file has changed since it was last read. One of these calls uses a one-second granularity, the other uses a two second granularity. As the two second call rounds any odd second down, then if the file has a timestamp of an odd number of seconds then the two timestamps will not match and Visual C++ will keep reporting the file has changed. Setting this option causes the two timestamps to match, and Visual C++ is happy.
Default: dos filetime resolution = No
Example: dos filetime resolution = Yes
Default: encrypt passwords = No
This option specifies a command to be run whenever a connection is made to the service. It takes the usual substitutions.
An interesting example is to send the users a welcome message every time they log in. Maybe a message of the day? Here is an example:
exec = csh -c 'echo \"Welcome to %S!\" | \ /usr/local/samba/bin/smbclient -M %m -I %I' &
Of course, this could get annoying after a while :-)
See also postexec
Default: none (no command executed)
Example: exec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log
This option is mainly used as a compatibility option for Visual C++ when used against Samba shares. Visual C++ generated makefiles have the object directory as a dependency for each object file, and a make rule to create the directory. Also, when NMAKE compares timestamps it uses the creation time when examining a directory. Thus the object directory will be created if it does not exist, but once it does exist it will always have an earlier timestamp than the object files it contains.
However, Unix time semantics mean that the create time reported by Samba will be updated whenever a file is created or deleted in the directory. NMAKE therefore finds all object files in the object directory bar the last one built are out of date compared to the directory and rebuilds them. Enabling this option ensures directories always predate their contents and an NMAKE build will proceed as expected.
Default: fake directory create times = No
Example: fake directory create times = Yes
When you set "fake oplocks = yes" Samba will always grant oplock requests no matter how many clients are using the file.
By enabling this option on all read-only shares or shares that you know will only be accessed from one client at a time you will see a big performance improvement on many operations. If you enable this option on shares where multiple clients may be accessing the files read-write at the same time you can get data corruption. Use this option carefully!
It is generally much better to use the real oplock support except for physically read-only media such as CDROMs.
Default: fake oplocks = No
Example: fake oplocks = Yes
Default: follow symlinks = Yes (smbd will follow symbolic links)
See also the parameter create mask for details on masking mode bits on created files.
Default: force create mode = 000
Example: force create mode = 0755
would force all created files to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'.
See also the parameter directory mask for details on masking mode bits on created directories.
Default: force directory mode = 000
Example: force directory mode = 0755
would force all created directories to have read and execute permissions set for 'group' and 'other' as well as the read/write/execute bits set for the 'user'.
Default: no forced group
Example: force group = agroup
This user name only gets used once a connection is established. Thus clients still need to connect as a valid user and supply a valid password. Once connected, all file operations will be performed as the "forced user", no matter what username the client connected as.
Default: no forced user
Example: force user = auser
Default:getwd cache = No
Example:getwd cache = Yes
One some systems the account "nobody" may not be able to print. Use another account in this case. You should test this by trying to log in as your guest user (perhaps by using the "su -" command) and trying to print using lpr.
Note that as of version 1.9 of Samba this option may be set differently for each service.
Default:specified at compile time
Example:guest account = nobody
If this parameter is 'Yes' for a service, then no password is required to connect to the service. Privileges will be those of the guest account.
See the section below on USERNAME/PASSWORD VALIDATION for more information about this option.
Default: guest ok = No
Example: guest ok = Yes
See the section below on USERNAME/PASSWORD VALIDATION for more information about this option.
Default: guest only = No
Example: guest only = Yes
Default: hide dot files = Yes
Example: hide dot files = No
Each entry in the list must be separated by a "/", which allows spaces to be included in the entry. '*' and '?' can be used to specify multiple files or directories as in DOS wildcards.
Each entry must be a unix path, not a DOS path and must not include the unix directory separator "/".
Note that the case sensitivity option is applicable in hiding files.
Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned.
See also hide dot files, veto files and case sensitive
Default No files or directories are hidden by this option (dot files are hidden by default because of the "hide dot files" option).
Example hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
The above example is based on files that the Macintosh client (DAVE) creates for internal use, and also still hides all files beginning with a dot.
username server:/some/file/system
and the program will extract the servername from before the first ':'. There should probably be a better parsing system that copes with different map formats and also Amd (another automounter) maps.
NB: The -DNETGROUP option is required in the Makefile for option to work and on some architectures the line -lrpcsvc needs to be added to the LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
See also NIS homedir
Default: homedir map = auto.home
Example: homedir map = amd.homedir
This parameter is a comma delimited set of hosts which are permitted to access a service.
If specified in the [global] section then it will apply to all services, regardless of whether the individual service has a different setting.
You can specify the hosts by name or IP number. For example, you could restrict access to only the hosts on a Class C subnet with something like "hosts allow = 150.203.5.".
You can also specify hosts by network/netmask pairs and by netgroup names if your system supports netgroups. The EXCEPT keyword can also be used to limit a wildcard list. The following examples may provide some help:
Example 1: allow all IPs in 150.203.*.* except one
hosts allow = 150.203. EXCEPT 150.203.6.66
Example 2: allow hosts that match the given network/netmask
hosts allow = 150.203.15.0/255.255.255.0
Example 3: allow a couple of hosts
hosts allow = lapland, arvidsjaur
Example 4: allow only hosts in netgroup "foonet" or localhost, but deny access from one particular host
hosts allow = @foonet, localhost
hosts deny = pirate
Note that access still requires suitable user-level passwords.
See testparm(1) for a way of testing your host access to see if it does what you expect.
Default: none (i.e., all hosts permitted access)
Example: hosts allow = 150.203.5. myhost.mynet.edu.au
This is the opposite of hosts allow - hosts listed here are NOT permitted access to services unless the specific services have their own lists to override this one. Where the lists conflict, the 'allow' list takes precedence.
Default: none (i.e., no hosts specifically excluded)
Example:hosts deny = 150.203.4. badhost.mynet.edu.au
This is not be confused with hosts allow which is about hosts access to services and is more useful for guest services. hosts equiv may be useful for NT clients which will not supply passwords to samba.
NOTE: The use of hosts.equiv can be a major security hole. This is because you are trusting the PC to supply the correct username. It is very easy to get a PC to supply a false username. I recommend that the hosts.equiv option be only used if you really know what you are doing, or perhaps on a home network where you trust your wife and kids :-)
Default No host equivalences
Example hosts equiv = /etc/hosts.equiv
It takes the standard substitutions, except %u, %P and %S
The option takes a list of ip/netmask pairs. The netmask may either be a bitmask, or a bitlength.
For example, the following line:
interfaces = 192.168.2.10/24 192.168.3.10/24
would configure two network interfaces with IP addresses 192.168.2.10 and 192.168.3.10. The netmasks of both interfaces would be set to 255.255.255.0.
You could produce an equivalent result by using:
interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
if you prefer that format.
If this option is not set then Samba will attempt to find a primary interface, but won't attempt to configure more than one interface.
A name starting with @ is interpreted as a UNIX group.
The current servicename is substituted for %S. This is useful in the [homes] section.
See also valid users
Default No invalid users
Example invalid users = root fred admin @wheel
Default: keep alive = 300
Example: keep alive = 60
See also lm interval.
Default: lm announce = Auto
Example: lm announce = True
See also lm announce.
Default: lm interval = 60
Example: lm interval = 120
Default: load printers = Yes
Example: load printers = No
Default: local master = yes
Default: lock dir = /tmp/samba
Example: lock dir = /usr/local/samba/var/locks
If set to No, all lock and unlock requests will appear to succeed and all lock queries will indicate that the queried lock is clear.
If set to Yes, real locking will be performed by the server.
This option may be particularly useful for read-only filesystems which do not need locking (such as CDROM drives).
Be careful about disabling locking either globally or in a specific service, as lack of locking may result in data corruption.
Default: locking = Yes
Example: locking = No
This option takes the standard substitutions, allowing you to have separate log files for each user or machine.
Example: log file = /usr/local/samba/var/log.%m
The value of the parameter (an integer) allows the logging level (debug level) to be specified in the smb.conf file. This is to give greater flexibility in the configuration of the system.
The default will be the logging level specified on the command line.
Example: log level = 3
Example: logon drive = h:
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
Default: logon home = "\\%N\%U"
Example: logon home = "\\remote_smb_server\%U"
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine. It also specifies the directory from which the "desktop", "start menu", "nethood" and "programs" folders, and their contents, are loaded and displayed on your Windows 95 client.
The share and the path must be readable by the user for the preferences and directories to be loaded onto the Windows 95 client. The share must be writeable when the user logs in for the first time, in order that the Windows 95 client can create the user.dat and other directories.
Thereafter, the directories and any of contents can, if required, be made read-only. It is not adviseable that the USER.DAT file be made read-only - rename it to USER.MAN to achieve the desired effect (a MANdatory profile).
Windows clients can sometimes maintain a connection to the [homes] share, even though there is no user logged in. Therefore, it is vital that the logon path does not include a reference to the homes share (i.e \\%N\HOMESprofile_path will cause problems).
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
Default: logon path = \\%N\%U\profile
Example: logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE
The script must be a relative path to the [netlogon] service. If the [netlogon] service specifies a path of /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then file that will be downloaded is:
/usr/local/samba/netlogon/STARTUP.BAT
The contents of the batch file is entirely your choice. A suggested command would be to add NET TIME \\SERVER /SET /YES, to force every machine to synchronise clocks with the same time server. Another use would be to add NET USE U: \\SERVER\UTILS for commonly used utilities, or NET USE Q: \\SERVER\ISO9001_QA.
Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users write permission on the batch files in a secure environment, as this would allow the batch files to be arbitrarily modified.
This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine.
Example: logon script = scripts/%U.bat
This command should be a program or script which takes a printer name and job number to pause the print job. Currently I don't know of any print spooler system that can do this with a simple option, except for the PPR system from Trinity College (ppr-dist.trincoll.edu/pub/ppr). One way of implementing this is by using job priorities, where jobs having a too low priority won't be sent to the printer. See also lpresume command.
If a %p is given then the printername is put in its place. A %j is replaced with the job number (an integer). On HPUX (see printing=hpux), if the -p%p option is added to the lpq command, the job will show up with the correct status, i.e. if the job priority is lower than the set fence priority it will have the PAUSED status, whereas if the priority is equal or higher it will have the SPOOLED or PRINTING status.
Note that it is good practice to include the absolute path in the lppause command as the PATH may not be available to the server.
Default: Currently no default value is given to this string
Example for HPUX: lppause command = /usr/bin/lpalt %p-%j -p0
The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash of the lpq command in use.
The default is 10 seconds, meaning that the cached results of a previous identical lpq command will be used if the cached data is less than 10 seconds old. A large value may be advisable if your lpq command is very slow.
A value of 0 will disable cacheing completely.
Default: lpq cache time = 10
Example: lpq cache time = 30
This command should be a program or script which takes a printer name as its only parameter and outputs printer status information.
Currently six styles of printer status information are supported; BSD, SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control which type is expected using the printing option.
Some clients (notably Windows for Workgroups) may not correctly send the connection number for the printer they are requesting status information about. To get around this, the server reports on the first printer service connected to by the client. This only happens if the connection number sent is invalid.
If a %p is given then the printername is put in its place. Otherwise it is placed at the end of the command.
Note that it is good practice to include the absolute path in the lpq command as the PATH may not be available to the server.
Default: depends on the setting of printing
Example: lpq command = /usr/bin/lpq %p
This command should be a program or script which takes a printer name and job number to resume the print job. See also the lppause command.
If a %p is given then the printername is put in its place. A %j is replaced with the job number (an integer).
Note that it is good practice to include the absolute path in the lpresume command as the PATH may not be available to the server.
Default: Currently no default value is given to this string
Example for HPUX: lpresume command = /usr/bin/lpalt %p-%j -p2
This command should be a program or script which takes a printer name and job number, and deletes the print job.
Currently seven styles of printer control are supported; BSD, SYSV, AIX HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control which type is expected using the printing option.
If a %p is given then the printername is put in its place. A %j is replaced with the job number (an integer).
Note that it is good practice to include the absolute path in the lprm command as the PATH may not be available to the server.
Default: depends on the setting of printing
Example 1:lprm command = /usr/bin/lprm -P%p %j
Example 2:lprm command = /usr/bin/cancel %p-%j
Warning: If two clients use the same magic script in the same directory the output file content is undefined.
Default: magic output = <magic script name>.out
Example: magic output = myfile.txt
Scripts executed in this way will be deleted upon completion, permissions permitting.
If the script generates output, output will be sent to the file specified by the magic output parameter.
Note that some shells are unable to interpret scripts containing carriage-return-linefeed instead of linefeed as the end-of-line marker. Magic scripts must be executable "as is" on the host, which for some hosts and some shells will require filtering at the DOS end.
Magic scripts are EXPERIMENTAL and should NOT be relied upon.
Default: None. Magic scripts disabled.
Example: magic script = user.csh
See the section on NAME MANGLING
So to map 'html' to 'htm' you put:
mangled map = (*.html *.htm)
One very useful case is to remove the annoying ;1 off the ends of filenames on some CDROMS (only visible under some UNIXes). To do this use a map of (*;1 *)
default: no mangled map
Example: mangled map = (*;1 *)
See the section on NAME MANGLING for details on how to control the mangling process.
If mangling is used then the mangling algorithm is as follows:
- the first (up to) five alphanumeric characters before the rightmost dot of the filename are preserved, forced to upper case, and appear as the first (up to) five characters of the mangled name.The two-digit hash value consists of upper case alphanumeric characters.- a tilde ("~") is appended to the first part of the mangled name, followed by a two-character unique sequence, based on the original root name (i.e., the original filename minus its final extension). The final extension is included in the hash calculation only if it contains any upper case characters or is longer than three characters.
Note that the character to use may be specified using the mangling char option, if you don't like ~.
- the first three alphanumeric characters of the final extension are preserved, forced to upper case and appear as the extension of the mangled name. The final extension is defined as that part of the original filename after the rightmost dot. If there are no dots in the filename, the mangled name will have no extension (except in the case of hidden files - see below).
- files whose UNIX name begins with a dot will be presented as DOS hidden files. The mangled name will be created as for other filenames, but with the leading dot removed and "___" as its extension regardless of actual original extension (that's three underscores).
This algorithm can cause name collisions only if files in a directory share the same first five alphanumeric characters. The probability of such a clash is 1/1300.
The name mangling (if enabled) allows a file to be copied between UNIX directories from DOS while retaining the long UNIX filename. UNIX files can be renamed to a new extension from DOS and will retain the same basename. Mangled names do not change between sessions.
Default: mangled names = Yes
Example: mangled names = No
Default: mangling char = ~
Example: mangling char = ^
This stack is a list of recently mangled base names (extensions are only maintained if they are longer than 3 characters or contains upper case characters).
The larger this value, the more likely it is that mangled names can be successfully converted to correct long UNIX names. However, large stack sizes will slow most directory access. Smaller stacks save memory in the server (each stack element costs 256 bytes).
It is not possible to absolutely guarantee correct long file names, so be prepared for some surprises!
Default: mangled stack = 50
Example: mangled stack = 100
Note that this requires the 'create mask' to be set such that owner execute bit is not masked out (ie. it must include 100). See the parameter create mask for details.
Default: map archive = Yes
Example: map archive = No
Note that this requires the 'create mask' to be set such that the world execute bit is not masked out (ie. it must include 001). See the parameter create mask for details.
Default: map hidden = No
Example: map hidden = Yes
Note that this requires the 'create mask' to be set such that the group execute bit is not masked out (ie. it must include 010). See the parameter create mask for details.
Default: map system = No
Example: map system = Yes
Record lock files are used to implement this feature. The lock files will be stored in the directory specified by the lock dir option.
Default: max connections = 0
Example: max connections = 10
Note that this option does not limit the amount of data you can put on the disk. In the above case you could still store much more than 100 MB on the disk, but if a client ever asks for the amount of free disk space or the total disk size then the result will be bounded by the amount specified in "max disk size".
This option is primarily useful to work around bugs in some pieces of software that can't handle very large disks, particularly disks over 1GB in size.
A "max disk size" of 0 means no limit.
Default: max disk size = 0
Example: max disk size = 1000
A size of 0 means no limit.
Default: max log size = 5000
Example: max log size = 1000
Default: max mux = 50
The maximum transmit packet size during a raw read. This option is no longer implemented as of version 1.7.00, and is kept only so old configuration files do not become invalid.
Default: max ttl = 14400
Default: max wins ttl = 259200
Default: max xmit = 65535
Example: max xmit = 8192
This would normally be a command that would deliver the message somehow. How this is to be done is up to your imagination.
What I use is:
message command = csh -c 'xedit %s;rm %s' &
This delivers the message using xedit, then removes it afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN IMMEDIATELY. That's why I have the & on the end. If it doesn't return immediately then your PCs may freeze when sending messages (they should recover after 30secs, hopefully).
All messages are delivered as the global guest user. The command takes the standard substitutions, although %u won't work (%U may be better in this case).
Apart from the standard substitutions, some additional ones apply. In particular:
%s = the filename containing the message
%t = the destination that the message was sent to (probably the server name)
%f = who the message is from
You could make this command send mail, or whatever else takes your fancy. Please let me know of any really interesting ideas you have.
Here's a way of sending the messages as mail to root:
message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered.
If you want to silently delete it then try "message command = rm %s".
For the really adventurous, try something like this:
message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \ -M %m; rm %s' &
this would execute the command as a script on the server, then give them the result in a WinPopup message. Note that this could cause a loop if you send a message from the server using smbclient! You better wrap the above in a script that checks for this :-)
Default: no message command
Example: message command = csh -c 'xedit %s;rm %s' &
Default: min print space = 0
Example: min print space = 2000
Default: min wins ttl = 21600
lmhosts Lookup an IP address in the Samba lmhosts file. host Do a standard host name to IP address resolution, using the system /etc/hosts, NIS, or DNS lookups. This method of name resolution is operating system depended (for instance on Solaris this may be controlled by the /etc/nsswitch.conf file). wins Query a name with the IP address listed in the "wins server =" parameter. If no WINS server has been specified this method will be ignored. bcast Do a broadcast on each of the known local interfaces listed in the "interfaces =" parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet.The default order is lmhosts, host, wins, bcast and these name resolution methods will be attempted in this order.
This option was first introduced in Samba 1.9.18p4.
Default: name resolve order = lmhosts host wins bcast
example: name resolve order = lmhosts bcast host
This will cause the local lmhosts file to be examined first, followed by a broadcast attempt, followed by a normal system hostname lookup.
See also netbios name.
Example:netbios aliases = TEST TEST1 TEST2
See also netbios aliases.
Example: netbios name = MYNAME
Default: NIS homedir = No
Example: NIS homedir = Yes
Default: networkstation user login = Yes
Example: networkstation user login = No
Default: null passwords = No
Example: null passwords = Yes
Note that this also means Samba won't try to deduce usernames from the service name. This can be annoying for the [homes] section. To get around this you could use "username = %S" which means your "username" list will be just the service name, which for home directories is the name of the user.
Default: only user = No
Example: only user = Yes
Oplocks may be selectively turned off on certain files on a per share basis. See the veto oplock files parameter.
Default: oplocks = Yes
Example: oplocks = No
Example: passwd chat debug = Yes
Default: passwd chat debug = No
This chat sequence is often quite site specific, depending on what local methods are used for password control (such as NIS+ etc).
The string can contain the macros %o and %n which are substituted for the old and new passwords respectively. It can also contain the standard macros \n \r \t and \s to give line-feed, carriage-return, tab and space.
The string can also contain a * which matches any sequence of characters.
Double quotes can be used to collect strings with spaces in them into a single string.
If the send string in any part of the chat sequence is a fullstop "." then no string is sent. Similarly, is the expect string is a fullstop then no string is expected.
Default: passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*
Example: passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n \ "*Reenter NEW password*" %n\n "*Password changed*"
This is only necessary if you have enabled remote password changing at compile time. Any occurrences of %u will be replaced with the user name.
Also note that many passwd programs insist in "reasonable" passwords, such as a minimum length, or the inclusion of mixed case chars and digits. This can pose a problem as some clients (such as Windows for Workgroups) uppercase the password before sending it.
Default: passwd program = /bin/passwd
Example: passwd program = /sbin/passwd %u
This parameter defines the maximum number of characters that may be upper case in passwords.
For example, say the password given was "FRED". If password level is set to 1 (one), the following combinations would be tried if "FRED" failed: "Fred", "fred", "fRed", "frEd", "freD". If password level was set to 2 (two), the following combinations would also be tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
The higher value this parameter is set to the more likely it is that a mixed case password will be matched against a single case password. However, you should be aware that use of this parameter reduces security and increases the time taken to process a new connection.
A value of zero will cause only two attempts to be made - the password as is and the password in all-lower case.
If you find the connections are taking too long with this option then you probably have a slow crypt() routine. Samba now comes with a fast "ufc crypt" that you can select in the Makefile. You should also make sure the PASSWORD_LENGTH option is correct for your system in local.h and includes.h. On most systems only the first 8 chars of a password are significant so PASSWORD_LENGTH should be 8, but on some longer passwords are significant. The includes.h file tries to select the right length for your system.
Default: password level = 0
Example: password level = 4
This options sets the name of the password server to use. It must be a netbios name, so if the machine's netbios name is different from its internet name then you may have to add its netbios name to /etc/hosts.
Note that with Samba 1.9.18p4 and above the name of the password server is looked up using the name resolve order parameter and so may resolved by any method and order described in that parameter.
The password server much be a machine capable of using the "LM1.2X002" or the "LM NT 0.12" protocol, and it must be in user level security mode.
NOTE: Using a password server means your UNIX box (running Samba) is only as secure as your password server. DO NOT CHOOSE A PASSWORD SERVER THAT YOU DON'T COMPLETELY TRUST.
Never point a Samba server at itself for password serving. This will cause a loop and could lock up your Samba server!
The name of the password server takes the standard substitutions, but probably the only useful one is %m, which means the Samba server will use the incoming client as the password server. If you use this then you better trust your clients, and you better restrict them with hosts allow!
If you list several hosts in the "password server" option then smbd will try each in turn till it finds one that responds. This is useful in case your primary server goes down.
If you are using a WindowsNT server as your password server then you will have to ensure that your users are able to login from the Samba server, as the network logon will appear to come from there rather than from the users workstation.
This parameter specifies a directory to which the user of the service is to be given access. In the case of printable services, this is where print data will spool prior to being submitted to the host for printing.
For a printable service offering guest access, the service should be readonly and the path should be world-writable and have the sticky bit set. This is not mandatory of course, but you probably won't get the results you expect if you do otherwise.
Any occurrences of %u in the path will be replaced with the username that the client is connecting as. Any occurrences of %m will be replaced by the name of the machine they are connecting from. These replacements are very useful for setting up pseudo home directories for users.
Note that this path will be based on root directory if one was specified.
Default: none
Example: path = /home/fred
An interesting example may be do unmount server resources:
postexec = /etc/umount /cdrom
See also preexec
Default: none (no command executed)
Example: postexec = echo \"%u disconnected from %S from %m (%I)\" >> /tmp/log
This is most useful when you have lots of PCs that persist in putting a control-D at the start of print jobs, which then confuses your printer.
Default: postscript = No
Example: postscript = Yes
Use this option with caution, because if there are several hosts (whether samba servers, Windows 95 or NT) that are preferred master browsers on the same subnet, they will each periodically and continuously attempt to become the local master browser. This will result in unnecessary broadcast traffic and reduced browsing capabilities.
See os level = nn
Default: preferred master = no
Note that if you just want all printers in your printcap file loaded then the load printers option is easier.
Default: no preloaded services
Example: preload = fred lp colorlp
Default: preserve case = no
See the section on NAME MANGLING for a fuller discussion.
The print command is simply a text string. It will be used verbatim, with two exceptions: All occurrences of "%s" will be replaced by the appropriate spool file name, and all occurrences of "%p" will be replaced by the appropriate printer name. The spool file name is generated automatically by the server, the printer name is discussed below.
The full path name will be used for the filename if %s is not preceded by a /. If you don't like this (it can stuff up some lpq output) then use %f instead. Any occurrences of %f get replaced by the spool filename without the full path at the front.
The print command MUST contain at least one occurrence of "%s" or %f - the "%p" is optional. At the time a job is submitted, if no printer name is supplied the "%p" will be silently removed from the printer command.
If specified in the [global] section, the print command given will be used for any printable service that does not have its own print command specified.
If there is neither a specified print command for a printable service nor a global print command, spool files will be created but not processed and (most importantly) not removed.
Note that printing may fail on some UNIXes from the "nobody" account. If this happens then create an alternative guest account that can print and set the guest account in the [global] section.
You can form quite complex print commands by realising that they are just passed to a shell. For example the following will log a print job, print the file, then remove it. Note that ; is the usual separator for command in shell scripts.
print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
You may have to vary this command considerably depending on how you normally print files on your system.
Default: print command = lpr -r -P %p %s
Example:print command = /usr/local/samba/bin/myprintscript %p %s
If this parameter is 'Yes', then clients may open, write to and submit spool files on the directory specified for the service.
Note that a printable service will ALWAYS allow writing to the service path (user privileges permitting) via the spooling of print data. The read only parameter controls only non-printing access to the resource.
Default: print ok = No
Example: print ok = Yes
A minimal printcap file would look something like this:
print1|My Printer 1
print2|My Printer 2
print3|My Printer 3
print4|My Printer 4
print5|My Printer 5
where the | separates aliases of a printer. The fact that the second alias has a space in it gives a hint to Samba that it's a comment.
NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba will assume the file is in AIX "qconfig" format if the string "/qconfig" appears in the printcap filename.
Default: printcap name = /etc/printcap
Example: printcap name = /etc/myprintcap
You need to set this parameter to the exact string (case sensitive) that describes the appropriate printer driver for your system. If you don't know the exact string to use then you should first try with no "printer driver" option set and the client will give you a list of printer drivers. The appropriate strings are shown in a scrollbox after you have chosen the printer manufacturer.
Example: printer driver = HP LaserJet 4L
This parameter specifies the name of the printer to which print jobs spooled through a printable service will be sent.
If specified in the [global] section, the printer name given will be used for any printable service that does not have its own printer name specified.
Default: none (but may be 'lp' on many systems)
Example: printer name = laserwriter
SAMBA_INSTALL_DIRECTORY/lib/printers.def
This file is created from Windows 95 'msprint.def' files found on the Windows 95 client system. For more details on setting up serving of printer drivers to Windows 95 clients, see the documentation file docs/PRINTER_DRIVER.txt.
Default: None (set in compile).
Example: printer driver file = /usr/local/samba/printers/drivers.def
Related parameters. printer driver location
\\MACHINE\PRINTER$
Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$ is a share you set up for serving printer driver files. For more details on setting this up see the documentation file docs/PRINTER_DRIVER.txt.
Default: None
Example: printer driver location = \\MACHINE\PRINTER$
Related paramerers. printer driver file
Currently six printing styles are supported. They are bsd, sysv, hpux, aix, qnx and plp.
To see what the defaults are for the other print commands when using these options use the "testparm" program.
As of version 1.9.18 of Samba this option can be set on a per printer basis
Example: printing = sysv
Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative merits of each are discussed in the README file.
Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol.
Default: protocol = NT1
Example: protocol = LANMAN1
See also the write list option
Default: read list =
Example: read list = mary, @students
If this parameter is 'Yes', then users of the service may not create or modify files in the service's directory.
Note that a printable service ('printable = Yes') will ALWAYS allow writing to the directory (user privileges permitting), but only via spooling operations.
Default: read only = Yes
Examples: read only = No
writable = No
write ok = Yes
Default: read prediction = No
Example: read prediction = Yes
If enabled, raw reads allow reads of 65535 bytes in one packet. This typically provides a major performance benefit.
However, some clients either negotiate the allowable block size incorrectly or are incapable of supporting larger block sizes, and for these clients you may need to disable raw reads.
In general this parameter should be viewed as a system tuning tool and left severely alone. See also write raw.
Default: read raw = Yes
Example: read raw = No
This overlapping works best when the speeds of disk and network access are similar, having very little effect when the speed of one is much greater than the other.
The default value is 2048, but very little experimentation has been done yet to determine the optimal value, and it is likely that the best value will vary greatly between systems anyway. A value over 65536 is pointless and will cause you to allocate memory unnecessarily.
Default: read size = 2048
Example: read size = 8192
This is useful if you want your Samba server to appear in a remote workgroup for which the normal browse propagation rules don't work. The remote workgroup can be anywhere that you can send IP packets to.
For example:
remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
the above line would cause nmbd to announce itself to the two given IP addresses using the given workgroup names. If you leave out the workgroup name then the one given in the workgroup option is used instead.
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable.
This option replaces similar functionality from the nmbd lmhosts file.
This is useful if you want your Samba server and all local clients to appear in a remote workgroup for which the normal browse propagation rules don't work. The remote workgroup can be anywhere that you can send IP packets to.
For example:
remote browse sync = 192.168.2.255 192.168.4.255
the above line would cause nmbd to request the master browser on the specified subnets or addresses to synchronise their browse lists with the local server.
The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable. If a machine IP address is given Samba makes NO attempt to validate that the remote machine is available, is listening, nor that it is in fact the browse master on it's segment.
If "revalidate" is Yes then the client will be denied automatic access as the same username.
Default: revalidate = No
Example: revalidate = Yes
The server will chroot() to this directory on startup. This is not strictly necessary for secure operation. Even without it the server will deny access to files not in one of the service entries. It may also check for, and deny access to, soft links to other parts of the filesystem, or attempts to use .. in file names to access other directories (depending on the setting of the wide links parameter).
Adding a "root dir" entry other than "/" adds an extra level of security, but at a price. It absolutely ensures that no access is given to files not in the sub-tree specified in the "root dir" option, *including* some files needed for complete operation of the server. To maintain full operability of the server you will need to mirror some system files into the "root dir" tree. In particular you will need to mirror /etc/passwd (or a subset of it), and any binaries or configuration files needed for printing (if required). The set of files that must be mirrored is operating system dependent.
Default: root directory = /
Example: root directory = /homes/smb
The option sets the "security mode bit" in replies to protocol negotiations to turn share level security on or off. Clients decide based on this bit whether (and how) to transfer user and password information to the server.
The default is "security=SHARE", mainly because that was the only option at one stage.
The alternatives are "security = user" or "security = server".
If your PCs use usernames that are the same as their usernames on the UNIX machine then you will want to use "security = user". If you mostly use usernames that don't exist on the UNIX box then use "security = share".
There is a bug in WfWg that may affect your decision. When in user level security a WfWg client will totally ignore the password you type in the "connect drive" dialog box. This makes it very difficult (if not impossible) to connect to a Samba service as anyone except the user that you are logged into WfWg as.
If you use "security = server" then Samba will try to validate the username/password by passing it to another SMB server, such as an NT box. If this fails it will revert to "security = USER".
See the password server option for more details.
Default: security = SHARE
Example: security = USER
It also sets what will appear in browse lists next to the machine name.
A %v will be replaced with the Samba version number.
A %h will be replaced with the hostname.
Default: server string = Samba %v
Example: server string = University of GNUs Samba Server
The setdir command is only implemented in the Digital Pathworks client. See the Pathworks documentation for details.
Default: set directory = No
Example: set directory = Yes
Default shared mem size = 102400
You must get this path right for many services to work correctly.
Default: taken from Makefile
Example: smbrun = /usr/local/samba/bin/smbrun
These open modes are not directly supported by UNIX, so they are simulated using lock files in the lock dir. The "lock dir" specified in smb.conf must be readable by all users.
The share modes that are enabled by this option are DENY_DOS, DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
Enabling this option gives full share compatibility but may cost a bit of processing time on the UNIX server. They are enabled by default.
Default: share modes = Yes
Example: share modes = No
Default: short preserve case = No
See the section on NAME MANGLING for a fuller discussion.
By default samba will accept connections on any address.
Example: socket address = 192.168.2.20
Socket options are controls on the networking layer of the operating systems which allow the connection to be tuned.
This option will typically be used to tune your Samba server for optimal performance for your local network. There is no way that Samba can know what the optimal parameters are for your net, so you must experiment and choose them yourself. I strongly suggest you read the appropriate documentation for your operating system first (perhaps "man setsockopt" will help).
You may find that on some systems Samba will say "Unknown socket option" when you supply an option. This means you either mis-typed it or you need to add an include file to includes.h for your OS. If the latter is the case please send the patch to me (samba-bugs@samba.anu.edu.au).
Any of the supported socket options may be combined in any way you like, as long as your OS allows it.
This is the list of socket options currently settable using this option:
SO_KEEPALIVE
SO_REUSEADDR
SO_BROADCAST
TCP_NODELAY
IPTOS_LOWDELAY
IPTOS_THROUGHPUT
SO_SNDBUF *
SO_RCVBUF *
SO_SNDLOWAT *
SO_RCVLOWAT *
Those marked with a * take an integer argument. The others can optionally take a 1 or 0 argument to enable or disable the option, by default they will be enabled if you don't specify 1 or 0.
To specify an argument use the syntax SOME_OPTION=VALUE for example SO_SNDBUF=8192. Note that you must not have any spaces before or after the = sign.
If you are on a local network then a sensible option might be
socket options = IPTOS_LOWDELAY
If you have an almost unloaded local network and you don't mind a lot of extra CPU usage in the server then you could try
socket options = IPTOS_LOWDELAY TCP_NODELAY
If you are on a wide area network then perhaps try setting IPTOS_THROUGHPUT.
Note that several of the options may cause your Samba server to fail completely. Use these options with caution!
Default: no socket options
Example: socket options = IPTOS_LOWDELAY
With this disabled smbstatus won't be able to tell you what connections are active.
Default: status = Yes
Example: status = No
When strict locking is "no" the server does file lock checks only when the client explicitly asks for them.
Well behaved clients always ask for lock checks when it is important, so in the vast majority of cases "strict locking = no" is preferable.
Default: strict locking = No
Example: strict locking = Yes
Default: strip dot = No
Example: strip dot = Yes
Default: syslog = 1
Default: syslog only = no
Default: sync always = No
Example: sync always = Yes
Default: time offset = 0
Example: time offset = 60
Default: time server = No
Example: time server = Yes
See also passwd program, passwd chat
Default: unix password sync = No
Example: unix password sync = Yes
Default: unix realname = No
Example: unix realname = Yes
In order for this parameter to work correctly the iencrypt passwords must be set to "No" when this parameter is set to "Yes".
Note that even when this parameter is set a user authenticating to smbd must still enter a valid password in order to connect correctly, and to update their hashed (smbpasswd) passwords.
Default: update encrypted = No
Multiple users may be specified in a comma-delimited list, in which case the supplied password will be tested against each username in turn (left to right).
The username= line is needed only when the PC is unable to supply its own username. This is the case for the coreplus protocol or where your users have different WfWg usernames to UNIX usernames. In both these cases you may also be better using the \\server\share%user syntax instead.
The username= line is not a great solution in many cases as it means Samba will try to validate the supplied password against each of the usernames in the username= line in turn. This is slow and a bad idea for lots of users in case of duplicate passwords. You may get timeouts or security breaches using this parameter unwisely.
Samba relies on the underlying UNIX security. This parameter does not restrict who can login, it just offers hints to the Samba server as to what usernames might correspond to the supplied password. Users can login as whoever they please and they will be able to do no more damage than if they started a telnet session. The daemon runs as the user that they log in as, so they cannot do anything that user cannot do.
To restrict a service to a particular set of users you can use the valid users line.
If any of the usernames begin with a @ then the name will be looked up in the groups file and will expand to a list of all users in the group of that name. Note that searching though a groups file can take quite some time, and some clients may time out during the search.
See the section below on USERNAME/PASSWORD VALIDATION for more information on how this parameter determines access to the services.
Default: The guest account if a guest service, else the name of the service.
Examples:username = fredusername = fred, mary, jack, jane, @users, @pcgroup
If this parameter is set to non-zero the behaviour changes. This parameter is a number that specifies the number of uppercase combinations to try whilst trying to determine the UNIX user name. The higher the number the more combinations will be tried, but the slower the discovery of usernames will be. Use this parameter when you have strange usernames on your UNIX machine, such as 'AstrangeUser'.
Default: username level = 0
Example: username level = 5
The map file is parsed line by line. Each line should contain a single UNIX username on the left then a '=' followed by a list of usernames on the right. The list of usernames on the right may contain names of the form @group in which case they will match any UNIX username in that group. The special client name '*' is a wildcard and matches any name.
The file is processed on each line by taking the supplied username and comparing it with each username on the right hand side of the '=' signs. If the supplied name matches any of the names on the right hand side then it is replaced with the name on the left. Processing then continues with the next line.
If any line begins with a '#' or a ';' then it is ignored
If any line begins with an ! then the processing will stop after that line if a mapping was done by the line. Otherwise mapping continues with every line being processed. Using ! is most useful when you have a wildcard mapping line later in the file.
For example to map from the name "admin" or "administrator" to the UNIX name "root" you would use
root = admin administrator
Or to map anyone in the UNIX group "system" to the UNIX name "sys" you would use
sys = @system
You can have as many mappings as you like in a username map file.
You can map Windows usernames that have spaces in them by using double quotes around the name. For example:
tridge = "Andrew Tridgell"
would map the windows username "Andrew Tridgell" to the unix username tridge.
The following example would map mary and fred to the unix user sys, and map the rest to guest. Note the use of the ! to tell Samba to stop processing if it gets a match on that line.
!sys = mary fred guest = *
Note that the remapping is applied to all occurrences of usernames. Thus if you connect to "\\server\fred" and "fred" is remapped to "mary" then you will actually be connecting to "\\server\mary" and will need to supply a password suitable for "mary" not "fred". The only exception to this is the username passed to the password server (if you have one). The password server will receive whatever username the client supplies without modification.
Also note that no reverse mapping is done. The main effect this has is with printing. Users who have been mapped may have trouble deleting print jobs as PrintManager under WfWg will think they don't own the print job.
Default no username map
Example username map = /usr/local/samba/lib/users.map
The option takes a list of characters in either integer or character form with spaces between them. If you give two characters with a colon between them then it will be taken as an lowercase:uppercase pair.
If you have an editor capable of entering the characters into the config file then it is probably easiest to use this method. Otherwise you can specify the characters in octal, decimal or hexadecimal form using the usual C notation.
For example to add the single character 'Z' to the charset (which is a pointless thing to do as it's already there) you could do one of the following
valid chars = Z
valid chars = z:Z
valid chars = 0132:0172
The last two examples above actually add two characters, and alter the uppercase and lowercase mappings appropriately.
Note that you MUST specify this parameter after the client code page parameter if you have both set. If "client code page" is set after the "valid chars" parameter the "valid chars" settings will be overwritten.
See also the client code page parameter.
Default: Samba defaults to using a reasonable set of valid characters for english systems
Example: valid chars = 0345:0305 0366:0326 0344:0304
The above example allows filenames to have the swedish characters in them.
NOTE: It is actually quite difficult to correctly produce a "valid chars" line for a particular system. To automate the process tino@augsburg.net has written a package called "validchars" which will automatically produce a complete "valid chars" line for a given client system. Look in the examples subdirectory for this package.
If this is empty (the default) then any user can login. If a username is in both this list and the invalid users list then access is denied for that user.
The current servicename is substituted for %S. This is useful in the [homes] section.
See also invalid users
Default No valid users list. (anyone can login)
Example valid users = greg, @pcusers
Each entry must be a unix path, not a DOS path and must not include the unix directory separator "/".
Note that the case sensitivity option is applicable in vetoing files.
One feature of the veto files parameter that it is important to be aware of, is that if a directory contains nothing but files that match the veto files parameter (which means that Windows/DOS clients cannot ever see them) is deleted, the veto files within that directory *are automatically deleted* along with it, if the user has UNIX permissions to do so.Setting this parameter will affect the performance of Samba, as it will be forced to check all files and directories for a match as they are scanned.
See also hide files and case sensitive
Default No files or directories are vetoed.
Examples Example 1. Veto any files containing the word Security, any ending in .tmp, and any directory containing the word root.
veto files = /*Security*/*.tmp/*root*/
Example 2. Veto the Apple specific files that a NetAtalk server creates.
veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
Default No files are vetoed for oplock grants.
Examples You might want to do this on files that you know will be heavily contended for by clients. A good example of this is in the NetBench SMB benchmark program, which causes heavy client contention for files ending in .SEM. To cause Samba not to grant oplocks on these files you would use the line (either in the [global] section or in the section for the particular NetBench share :
veto oplock files = /*.SEM/
The default is the name of the share
Default: wide links = Yes
Example: wide links = No
Default: wins proxy = No
You should point this at your WINS server if you have a multi-subnetted network.
Default: wins server =
Default: wins support = No
Default: set in the Makefile
Example: workgroup = MYGROUP
Note that if a user is in both the read list and the write list then they will be given write access.
See also the read list option
Default: write list =
Example: write list = admin, root, @staff
Default: write raw = Yes
Example: write raw = No
If the service is marked "guest only = yes" then steps 1 to 5 are skipped
Step 1: If the client has passed a username/password pair and that username/password pair is validated by the UNIX system's password programs then the connection is made as that username. Note that this includes the \\server\service%username method of passing a username.
Step 2: If the client has previously registered a username with the system and now supplies a correct password for that username then the connection is allowed.
Step 3: The client's netbios name and any previously used user names are checked against the supplied password, if they match then the connection is allowed as the corresponding user.
Step 4: If the client has previously validated a username/password pair with the server and the client has passed the validation token then that username is used. This step is skipped if "revalidate = yes" for this service.
Step 5: If a "username = " field is given in the smb.conf file for the service and the client has supplied a password, and that password matches (according to the UNIX system's password checking) with one of the usernames from the username= field then the connection is made as the username in the "username=" line. If one of the username in the username= list begins with a @ then that name expands to a list of names in the group of the same name.
Step 6: If the service is a guest service then a connection is made as the username given in the "guest account =" for the service, irrespective of the supplied password.
There are several options that control the way mangling is performed, and they are grouped here rather than listed separately.
All of these options can be set separately for each service (or globally, of course).
The options are:
"mangle case = yes/no" controls if names that have characters that aren't of the "default" case are mangled. For example, if this is yes then a name like "Mail" would be mangled. Default no.
"case sensitive = yes/no" controls whether filenames are case sensitive. If they aren't then Samba must do a filename search and match on passed names. Default no.
"default case = upper/lower" controls what the default case is for new filenames. Default lower.
"preserve case = yes/no" controls if new files are created with the case that the client passes, or if they are forced to be the "default" case. Default no.
"short preserve case = yes/no" controls if new files which conform to 8.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the "default" case. This option can be use with "preserve case = yes" to permit long filenames to retain their case, while short names are lowered. Default no.