runsv

title: runsv(8)

text:
# runsv(8)

## NAME
runsv - starts and monitors a service and optionally an appendant log service

## SYNOPSIS
runsv service

## DESCRIPTION
service must be a directory.

runsv switches to the directory service and starts ./run. If ./run exits and ./finish exists, runsv starts ./finish. If ./finish doesn't exist or ./finish exits, runsv restarts ./run.

If ./run or ./finish exit immediately, runsv waits a second before starting ./finish or restarting ./run.

Two arguments are given to ./finish. The first one is ./run's exit code, or -1 if ./run didn't exit normally. The second one is the least significant byte of the exit status as determined by waitpid(2); for instance it is 0 if ./run exited normally, and the signal number if ./run was terminated by a signal. If runsv cannot start ./run for some reason, the exit code is 111 and the status is 0.

If the file service/down exists, runsv does not start ./run immediately. The control interface (see below) can be used to start the service and to give other commands to runsv.

If the directory service/log exists, runsv creates a pipe, redirects service/run's and service/finish's standard output to the pipe, switches to the directory service/log and starts ./run script. The standard input of the log service is redirected to read from the pipe.

runsv maintains status information in a binary format (compatible to the daemontools' supervise program) in service/supervise/status and service/log/supervise/status, and in a human-readable format in service/supervise/stat, service/log/supervise/stat, service/supervise/pid, service/log/supervise/pid.

## CONTROL
The named pipes service/supervise/control, and (optionally) service/log/supervise/control are provided to give commands to runsv. You can use sv(8) to control the service or just write one of the following characters to the named pipe:

u

Up. If the service is not running, start it. If the service stops, restart it.

d

Down. If the service is running, send it a TERM signal, and then a CONT signal. If ./run exits, start ./finish if it exists. After it stops, do not restart service.

o

Once. If the service is not running, start it. Do not restart it if it stops.

p

Pause. If the service is running, send it a STOP signal.

c

Continue. If the service is running, send it a CONT signal.

h

Hangup. If the service is running, send it a HUP signal.

a

Alarm. If the service is running, send it a ALRM signal.

i

Interrupt. If the service is running, send it a INT signal.

q

Quit. If the service is running, send it a QUIT signal.

1

User-defined 1. If the service is running, send it a USR1 signal.

2

User-defined 2. If the service is running, send it a USR2 signal.

t

Terminate. If the service is running, send it a TERM signal.

k

Kill. If the service is running, send it a KILL signal.

x

Exit. If the service is running, send it a TERM signal, and then a CONT signal. Do not restart the service. If the service is down, and no log service exists, runsv exits. If the service is down and a log service exists, runsv closes the standard input of the log service, and waits for it to terminate. If the log service is down, runsv exits. This command is ignored if it is given to service/log/supervise/control.

Example: to send a TERM signal to the socklog-unix service, either do

\# sv term /etc/runit/service/socklog-unix

or

\# printf t >/etc/runit/service/socklog-unix/supervise/control

printf(1) usually blocks if no runsv process is running in the service directory.

## CUSTOMIZE CONTROL
For each control character c sent to the control pipe, runsv first checks if service/control/c exists and is executable. If so, it starts service/control/c and waits for it to terminate, before interpreting the command. If the program exits with return code 0, runsv refrains from sending the service the corresponding signal. The command o is always considered as command u. On command d first service/control/t is checked, and then service/control/d. On command x first service/control/t is checked, and then service/control/x. The control of the optional log service cannot be customized.

## SIGNALS
If runsv receives a TERM signal, it acts as if the character x was written to the control pipe.

## EXIT CODES
runsv exits 111 on an error on startup or if another runsv is running in service.

runsv exits 0 if it was told to exit.

## SEE ALSO
sv(8), chpst(8), svlogd(8), runit(8), runit-init(8), runsvdir(8), runsvchdir(8), utmpset(8)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


runsvchdir

package: runit

title: runsvchdir(8)

text:
# runsvchdir(8)

## NAME
runsvchdir - change services directory of runsvdir(8)

## SYNOPSIS
runsvchdir dir

## DESCRIPTION
dir is a services directory for the use with runsvdir(8). If dir does not start with a slash, it is searched in /etc/runit/runsvdir/. dir must not start with a dot.

runsvchdir switches to the directory /etc/runit/runsvdir/, copies current to previous, and replaces current with a symlink pointing to dir.

Normally /etc/runit/service is a symlink to current, and runsvdir(8) is running /etc/runit/service/.

## EXIT CODES
runsvchdir prints an error message and exits 111 on error. runsvchdir exits 0 on success.

## FILES

/etc/runit/runsvdir/previous

/etc/runit/runsvdir/current

/etc/runit/runsvdir/current.new

## SEE ALSO
runsvdir(8), runit(8), runit-init(8), sv(8), runsv(8)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


runsvdir

title: runsvdir(8)

text:
# runsvdir(8)

## NAME
runsvdir - starts and monitors a collection of runsv(8) processes

## SYNOPSIS
runsvdir [-P] dir [ log ]

## DESCRIPTION
dir must be a directory. log is a space holder for a readproctitle log, and must be at least seven characters long or absent.

runsvdir starts a runsv(8) process for each subdirectory, or symlink to a directory, in the services directory dir, up to a limit of 1000 subdirectories, and restarts a runsv(8) process if it terminates. runsvdir skips subdirectory names starting with dots. runsv(8) must be in runsvdir's PATH.

At least every five seconds runsvdir checks whether the time of last modification, the inode, or the device, of the services directory dir has changed. If so, it re-scans the service directory, and if it sees a new subdirectory, or new symlink to a directory, in dir, it starts a new runsv(8) process; if runsvdir sees a subdirectory being removed that was previously there, it sends the corresponding runsv(8) process a TERM signal, stops monitoring this process, and so does not restart the runsv(8) process if it exits.

If the log argument is given to runsvdir, all output to standard error is redirected to this log, which is similar to the daemontools' readproctitle log. To see the most recent error messages, use a process-listing tool such as ps(1). runsvdir writes a dot to the readproctitle log every 15 minutes so that old error messages expire.

## OPTIONS
-P

use setsid(2) to run each runsv(8) process in a new session and separate process group.

## SIGNALS
If runsvdir receives a TERM signal, it exits with 0 immediately.

If runsvdir receives a HUP signal, it sends a TERM signal to each runsv(8) process it is monitoring and then exits with 111.

## SEE ALSO
sv(8), runsv(8), runsvchdir(8), runit(8), runit-init(8), chpst(8), svlogd(8), utmpset(8), setsid(2)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


sv

title: sv(8)

text:
# sv(8)

## NAME
sv - control and manage services monitored by runsv(8)

## SYNOPSIS
sv [-v] [-w sec] command services

/etc/init.d/service [-w sec] command

## DESCRIPTION
The sv program reports the current status and controls the state of services monitored by the runsv(8) supervisor.

services consists of one or more arguments, each argument naming a directory service used by runsv(8). If service doesn't start with a dot or slash and doesn't end with a slash, it is searched in the default services directory /etc/runit/service/, otherwise relative to the current directory.

command is one of up, down, status, once, pause, cont, hup, alarm, interrupt, 1, 2, term, kill, or exit, or start, stop, restart, shutdown, force-stop, force-reload, force-restart, force-shutdown.

The sv program can be sym-linked to /etc/init.d/ to provide an LSB init script interface. The service to be controlled then is specified by the base name of the ``init script''.

## COMMANDS
status

Report the current status of the service, and the appendant log service if available, to standard output.

up

If the service is not running, start it. If the service stops, restart it.

down

If the service is running, send it the TERM signal, and the CONT signal. If ./run exits, start ./finish if it exists. After it stops, do not restart service.

once

If the service is not running, start it. Do not restart it if it stops.

pause cont hup alarm interrupt quit 1 2 term kill

If the service is running, send it the STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, or KILL signal respectively.

exit

If the service is running, send it the TERM signal, and the CONT signal. Do not restart the service. If the service is down, and no log service exists, runsv(8) exits. If the service is down and a log service exists, runsv(8) closes the standard input of the log service and waits for it to terminate. If the log service is down, runsv(8) exits. This command is ignored if it is given to an appendant log service.

sv actually looks only at the first character of these commands.

### Commands compatible to LSB init script actions
status

Same as status.

start

Same as up, but wait up to 7 seconds for the command to take effect. Then report the status or timeout. If the script ./check exists in the service directory, sv runs this script to check whether the service is up and available; it's considered to be available if ./check exits with 0.

stop

Same as down, but wait up to 7 seconds for the service to become down. Then report the status or timeout.

reload

Same as hup, and additionally report the status afterwards.

restart

Send the commands term, cont, and up to the service, and wait up to 7 seconds for the service to restart. Then report the status or timeout. If the script ./check exists in the service directory, sv runs this script to check whether the service is up and available again; it's considered to be available if ./check exits with 0.

shutdown

Same as exit, but wait up to 7 seconds for the runsv(8) process to terminate. Then report the status or timeout.

force-stop

Same as down, but wait up to 7 seconds for the service to become down. Then report the status, and on timeout send the service the kill command.

force-reload

Send the service the term and cont commands, and wait up to 7 seconds for the service to restart. Then report the status, and on timeout send the service the kill command.

force-restart

Send the service the term, cont and up commands, and wait up to 7 seconds for the service to restart. Then report the status, and on timeout send the service the kill command. If the script ./check exists in the service directory, sv runs this script to check whether the service is up and available again; it's considered to be available if ./check exits with 0.

force-shutdown

Same as exit, but wait up to 7 seconds for the runsv(8) process to terminate. Then report the status, and on timeout send the service the kill command.

try-restart

if the service is running, send it the term and cont commands, and wait up to 7 seconds for the service to restart. Then report the status or timeout.

### Additional Commands
check

Check for the service to be in the state that's been requested. Wait up to 7 seconds for the service to reach the requested state, then report the status or timeout. If the requested state of the service is up, and the script ./check exists in the service directory, sv runs this script to check whether the service is up and running; it's considered to be up if ./check exits with 0.

## OPTIONS
-v

If the command is up, down, term, once, cont, or exit, then wait up to 7 seconds for the command to take effect. Then report the status or timeout.

-w sec

Override the default timeout of 7 seconds with sec seconds. This option implies -v.

## ENVIRONMENT
SVDIR

The environment variable $SVDIR overrides the default services directory /etc/runit/service/.

SVWAIT

The environment variable $SVWAIT overrides the default 7 seconds to wait for a command to take effect. It is overridden by the -w option.

## EXIT CODES
sv exits 0, if the command was successfully sent to all services, and, if it was told to wait, the command has taken effect to all services.

For each service that caused an error (e.g. the directory is not controlled by a runsv(8) process, or sv timed out while waiting), sv increases the exit code by one and exits non zero. The maximum is 99. sv exits 100 on error.

If sv is called with a base name other than sv: it exits 1 on timeout or trouble sending the command; if the command is status, it exits 3 if the service is down, and 4 if the status is unknown; it exits 2 on wrong usage, and 151 on error.

## SEE ALSO
runsv(8), chpst(8), svlogd(8), runsvdir(8), runsvchdir(8), runit(8), runit-init(8)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


svlogd

title: svlogd(8)

summary: runit's service logging daemon

text:
# svlogd(8)

## NAME
svlogd - runit's service logging daemon

## SYNOPSIS
svlogd [-tttv] [-r c] [-R xyz] [-l len] [-b buflen] logs

## DESCRIPTION
logs consists of one or more arguments, each specifying a directory.

svlogd continuously reads log data from its standard input, optionally filters log messages, and writes the data to one or more automatically rotated logs.

Recent log files can automatically be processed by an arbitrary processor program when they are rotated, and svlogd can be told to alert selected log messages to standard error, and through udp.

svlogd runs until it sees end-of-file on standard input or is sent a TERM signal, see below.

### LOG DIRECTORY
A log directory log contains some number of old log files, and the current log file current. Old log files have a file name starting with @ followed by a precise timestamp (see the daemontools' tai64n program), indicating when current was rotated and renamed to this file.

A log directory additionally contains the lock file lock, maybe state and newstate, and optionally the file config. svlogd creates necessary files if they don't exist.

If svlogd has trouble opening a log directory, it prints a warning, and ignores this log directory. If svlogd is unable to open all log directories given at the command line, it exits with an error. This can happen on start-up or after receiving a HUP signal.

### LOG FILE ROTATION
svlogd appends selected log messages to the current log file. If current has size bytes or more (or there is a new-line within the last len of size bytes), or is older than a specified amount of time, current is rotated:

svlogd closes current, changes permission of current to 0755, renames current to @timestamp.s, and starts with a new empty current. If svlogd sees num or more old log files in the log directory, it removes the oldest one. Note that this doesn't decrease the number of log files if there are already more than num log files, this must be done manually, e.g. for keeping 10 log files:

ls -1 \@* |sort |sed -ne '10,$p' |xargs rm

### PROCESSOR
If svlogd is told to process recent log files, it saves current to @timestamp.u, feeds @timestamp.u through ``sh -c "processor"'' and writes the output to @timestamp.t. If the processor finishes successfully, @timestamp.t is renamed to @timestamp.s, and @timestamp.u is deleted; otherwise @timestamp.t is deleted and the processor is started again. svlogd also saves any output that the processor writes to file descriptor 5, and makes that output available on file descriptor 4 when running processor on the next log file rotation.

A processor is run in the background. If svlogd sees a previously started processor still running when trying to start a new one for the same log, it blocks until the currently running processor has finished successfully. Only the HUP signal works in that situation. Note that this may block any program feeding its log data to svlogd.

### CONFIG
On startup, and after receiving a HUP signal, svlogd checks for each log directory log if the configuration file log/config exists, and if so, reads the file line by line and adjusts configuration for log as follows:

If the line is empty, or starts with a ``#'', it is ignored. A line of the form

ssize

sets the maximum file size of current when svlogd should rotate the current log file to size bytes. Default is 1000000. If size is zero, svlogd doesn't rotate log files. You should set size to at least (2 * len).

nnum

sets the number of old log files svlogd should maintain to num. If svlogd sees more that num old log files in log after log file rotation, it deletes the oldest one. Default is 10. If num is zero, svlogd doesn't remove old log files.

Nmin

sets the minimum number of old log files svlogd should maintain to min. min must be less than num. If min is set, and svlogd cannot write to current because the filesystem is full, and it sees more than min old log files, it deletes the oldest one.

ttimeout

sets the maximum age of the current log file when svlogd should rotate the current log file to timeout seconds. If current is timeout seconds old, and is not empty, svlogd forces log file rotation.

!processor

tells svlogd to feed each recent log file through processor (see above) on log file rotation. By default log files are not processed.

ua.b.c.d[:port]

tells svlogd to transmit the first len characters of selected log messages to the IP address a.b.c.d, port number port. If port isn't set, the default port for syslog is used (514). len can be set through the -l option, see below. If svlogd has trouble sending udp packets, it writes error messages to the log directory. Attention: logging through udp is unreliable, and should be used in private networks only.

Ua.b.c.d[:port]

is the same as the u line above, but the log messages are no longer written to the log directory, but transmitted through udp only. Error messages from svlogd concerning sending udp packages still go to the log directory.

pprefix

tells svlogd to prefix each line to be written to the log directory, to standard error, or through UDP, with prefix.

If a line starts with a -, +, e, or E, svlogd matches the first len characters of each log message against pattern and acts accordingly:

-pattern

the log message is deselected.

+pattern

the log message is selected.

epattern

the log message is selected to be printed to standard error.

Epattern

the log message is deselected to be printed to standard error.

Initially each line is selected to be written to log/current. Deselected log messages are discarded from log. Initially each line is deselected to be written to standard err. Log messages selected for standard error are written to standard error.

## PATTERN MATCHING
svlogd matches a log message against the string pattern as follows:

pattern is applied to the log message one character by one, starting with the first. A character not a star (``*'') and not a plus (``+'') matches itself. A plus matches the next character in pattern in the log message one or more times. A star before the end of pattern matches any string in the log message that does not include the next character in pattern. A star at the end of pattern matches any string.

Timestamps optionally added by svlogd are not considered part of the log message.

An svlogd pattern is not a regular expression. For example consider a log message like this

2005-12-18_09:13:50.97618 tcpsvd: info: pid 1977 from 10.4.1.14

The following pattern doesn't match

-*pid*

because the first star matches up to the first p in tcpsvd, and then the match fails because i is not s. To match this log message, you can use a pattern like this instead

-*: *: pid *

## OPTIONS
-t

timestamp. Prefix each selected line with a precise timestamp (see the daemontools' tai64n program) when writing to log or to standard error.

-tt

timestamp. Prefix each selected line with a human readable, sortable UTC timestamp of the form YYYY-MM-DD_HH:MM:SS.xxxxx when writing to log or to standard error.

-ttt

timestamp. Prefix each selected line with a human readable, sortable UTC timestamp of the form YYYY-MM-DDTHH:MM:SS.xxxxx when writing to log or to standard error.

-r c

replace. c must be a single character. Replace non-printable characters in log messages with c. Characters are replaced before pattern matching is applied.

-R xyz

replace charset. Additionally to non-printable characters, replace all characters found in xyz with c (default ``_'').

-l len

line length. Pattern matching applies to the first len characters of a log message only. Default is 1000.

-b buflen

buffer size. Set the size of the buffer svlogd uses when reading from standard input and writing to logs to buflen. Default is 1024. buflen must be greater than len. For svlogd instances that process a lot of data in short time, the buffer size should be increased to improve performance.

-v

verbose. Print verbose messages to standard error.

## SIGNALS
If svlogd is sent a HUP signal, it closes and reopens all logs, and updates their configuration according to log/config. If svlogd has trouble opening a log directory, it prints a warning, and discards this log directory. If svlogd is unable to open all log directories given at the command line, it exits with an error.

If svlogd is sent a TERM signal, or if it sees end-of-file on standard input, it stops reading standard input, processes the data in the buffer, waits for all processor subprocesses to finish if any, and exits 0 as soon as possible.

If svlogd is sent an ALRM signal, it forces log file rotation for all logs with a non empty current log file.

## SEE ALSO
sv(8), runsv(8), chpst(8), runit(8), runit-init(8), runsvdir(8), runsvchdir(8)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


utmpset

title: utmpset(8)

summary: logout a line from utmp and wtmp file

text:
# utmpset(8)

## NAME
utmpset - logout a line from utmp and wtmp file

## SYNOPSIS
utmpset [ -w ] line

## DESCRIPTION
The utmpset program modifies the user accounting database utmp(5) and optionally wtmp(5) to indicate that the user on the terminal line has logged out.

Ordinary init(8) processes handle utmp file records for local login accounting. The runit(8) program doesn't include code to update the utmp file, the getty(8) processes are handled the same as all other services.

To enable local login accounting, add utmpset to the getty(8) finish scripts, e.g.:

$ cat /service/getty-5/finish

\#!/bin/sh

exec utmpset -w tty5

$

## OPTIONS
-w

wtmp. Additionally to the utmp file, write an empty record for line to the wtmp file.

## EXIT CODES
utmpset returns 111 on error, 1 on wrong usage, 0 in all other cases.

## SEE ALSO
sv(8), runsv(8), runit(8), runit-init(8) runsvdir(8), runsvchdir(8), chpst(8), svlogd(8), getty(8)

http://smarden.org/runit/

## AUTHOR
Gerrit Pape <pape@smarden.org>


cifsdd

package: samba-client

title: cifsdd(8)

summary: convert and copy a file over SMB

text:
# cifsdd(8)

## NAME
cifsdd - convert and copy a file over SMB

## SYNOPSIS
cifsdd [OPERAND]...

cifsdd OPTION

## DESCRIPTION
This tool is part of the samba(7) suite.

Copy a file, converting and formatting according to the operands.

bs=BYTES

read and write up to BYTES bytes at a time (default: 4096)

ibs=BYTES

read up to BYTES bytes at a time (default: 4096)

obs=BYTES

write BYTES bytes at a time (default: 4096)

if=FILE

read from FILE instead of stdin

of=FILE

write to FILE instead of stdout

count=N

copy only N input blocks

seek=N

skip N obs-sized blocks at start of output

skip=N

skip N ibs-sized blocks at start of input

direct

use direct I/O for data

sync

use synchronous writes

oplock

take oplocks on the input and output files

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.

The cifsdd manpage was written by Andreas Schneider.


samba-regedit

title: samba-regedit(8)

text:
# samba-regedit(8)

## NAME
samba-regedit - ncurses based tool to manage the Samba registry

## SYNOPSIS
samba-regedit [-?|--help] [--usage] [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout] [--configfile=CONFIGFILE] [--option=name=value] [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full] [-R|--name-resolve=NAME-RESOLVE-ORDER] [-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL] [-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE] [-W|--workgroup=WORKGROUP] [--realm=REALM] [-U|--user=[DOMAIN/]USERNAME[%PASSWORD]] [-N|--no-pass] [--password=STRING] [--pw-nt-hash] [-A|--authentication-file=FILE] [-P|--machine-pass] [--simple-bind-dn=DN] [--use-kerberos=desired|required|off] [--use-krb5-ccache=CCACHE] [--use-winbind-ccache] [--client-protection=sign|encrypt|off] [-V|--version]

## DESCRIPTION
This tool is part of the samba(7) suite.

samba-regedit is a ncurses based tool to manage the Samba registry. It can be used to show/edit registry keys/subkeys and their values.

## OPTIONS
-?|--help

Print a summary of command line options.

--usage

Display brief usage message.

-d|--debuglevel=DEBUGLEVEL

level is an integer from 0 to 10. The default value if this parameter is not specified is 1 for client applications. The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

Note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file.

--debug-stdout

This will redirect debug output to STDOUT. By default all clients are logging to STDERR.

--configfile=<configuration file>

The file specified contains the configuration details required by the client. The information in this file can be general for client and server or only provide client specific like options such as client smb encrypt. See /etc/samba/smb.conf for more information. The default configuration file name is determined at compile time.

--option=<name>=<value>

Set the smb.conf(5) option "<name>" to value "<value>" from the command line. This overrides compiled-in defaults and options read from the configuration file. If a name or a value includes a space, wrap whole --option=name=value into quotes.

-l|--log-basename=logdirectory

Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.

--leak-report

Enable talloc leak reporting on exit.

--leak-report-full

Enable full talloc leak reporting on exit.

-V|--version

Prints the program version number.

-R|--name-resolve=NAME-RESOLVE-ORDER

This option is used to determine what naming services and in what order to resolve host names to IP addresses. The option takes a space-separated string of different name resolution options. The best is to wrap the whole --name-resolve=NAME-RESOLVE-ORDER into quotes. The options are: "lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:

•lmhosts: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the lmhosts(5) for details) then any name type matches for lookup.

•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 dependent, for instance on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored.

•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.

If this parameter is not set then the name resolve order defined in the /etc/samba/smb.conf file parameter (name resolve order) will be used. The default order is lmhosts, host, wins, bcast. Without this parameter or any entry in the name resolve order parameter of the /etc/samba/smb.conf file, the name resolution methods will be attempted in this order.

-O|--socket-options=SOCKETOPTIONS

TCP socket options to set on the client socket. See the socket options parameter in the /etc/samba/smb.conf manual page for the list of valid options.

-m|--max-protocol=MAXPROTOCOL

The value of the parameter (a string) is the highest protocol level that will be supported by the client. Note that specifying this parameter here will override the client max protocol parameter in the /etc/samba/smb.conf file.

-n|--netbiosname=NETBIOSNAME

This option allows you to override the NetBIOS name that Samba uses for itself. This is identical to setting the netbios name parameter in the /etc/samba/smb.conf file. However, a command line setting will take precedence over settings in /etc/samba/smb.conf.

--netbios-scope=SCOPE

This specifies a NetBIOS scope that nmblookup will use to communicate with when generating NetBIOS names. For details on the use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS scopes are very rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with.

-W|--workgroup=WORKGROUP

Set the SMB domain of the username. This overrides the default domain which is the domain defined in smb.conf. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM). Note that specifying this parameter here will override the workgroup parameter in the /etc/samba/smb.conf file.

-r|--realm=REALM

Set the realm for the domain. Note that specifying this parameter here will override the realm parameter in the /etc/samba/smb.conf file.

-U|--user=[DOMAIN\]USERNAME[%PASSWORD]

Sets the SMB username or username and password. If %PASSWORD is not specified, the user will be prompted. The client will first check the USER environment variable (which is also permitted to also contain the password separated by a %), then the LOGNAME variable (which is not permitted to contain a password) and if either exists, the value is used. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used.

A third option is to use a credentials file which contains the plaintext of the username and password. This option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables. If this method is used, make certain that the permissions on the file restrict access from unwanted users. See the -A for more details.

Be cautious about including passwords in scripts or passing user-supplied values onto the command line. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with kinit.

While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race.

-N|--no-pass

If specified, this parameter suppresses the normal password prompt from the client to the user. This is useful when accessing a service that does not require a password. Unless a password is specified on the command line or this parameter is specified, the client will request a password.

If a password is specified on the command line and this option is also defined the password on the command line will be silently ignored and no password will be used.

--password

Specify the password on the commandline. Be cautious about including passwords in scripts or passing user-supplied values onto the command line. For security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with kinit.

If --password is not specified, the tool will check the PASSWD environment variable, followed by PASSWD_FD which is expected to contain an open file descriptor (FD) number.

Finally it will check PASSWD_FILE (containing a file path to be opened). The file should only contain the password. Make certain that the permissions on the file restrict access from unwanted users!

While Samba will attempt to scrub the password from the process title (as seen in ps), this is after startup and so is subject to a race.

--pw-nt-hash

The supplied password is the NT hash.

-A|--authentication-file=filename

This option allows you to specify a file from which to read the username and password used in the connection. The format of the file is:

```
				username = <value>
				password = <value>
				domain   = <value>

```

Make certain that the permissions on the file restrict access from unwanted users!

-P|--machine-pass

Use stored machine account password.

--simple-bind-dn=DN

DN to use for a simple bind.

--use-kerberos=desired|required|off

This parameter determines whether Samba client tools will try to authenticate using Kerberos. For Kerberos authentication you need to use dns names instead of IP addresses when connecting to a service. Note that specifying this parameter here will override the client use kerberos parameter in the /etc/samba/smb.conf file.

--use-krb5-ccache=CCACHE

Specifies the credential cache location for Kerberos authentication. This will set --use-kerberos=required too.

--use-winbind-ccache

Try to use the credential cache by winbind.

--client-protection=sign|encrypt|off

Sets the connection protection the client tool should use. Note that specifying this parameter here will override the client protection parameter in the /etc/samba/smb.conf file.

In case you need more fine grained control you can use: --option=clientsmbencrypt=OPTION, --option=clientipcsigning=OPTION, --option=clientsigning=OPTION.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## SEE ALSO
smbd(8), samba(7) and net(8).

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.

The samba-regedit man page was written by Karolin Seeger.


smbpasswd

title: smbpasswd(8)

summary: change a user\*(Aqs SMB password

text:
# smbpasswd(8)

## NAME
smbpasswd - change a user's SMB password

## SYNOPSIS
smbpasswd [-a] [-c <config file>] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h] [-s] [-w pass] [-W] [-i] [-L] [username]

## DESCRIPTION
This tool is part of the samba(7) suite.

The smbpasswd program has several different functions, depending on whether it is run by the root user or not. When run as a normal user it allows the user to change the password used for their SMB sessions on any machines that store SMB passwords.

By default (when run with no arguments) it will attempt to change the current user's SMB password on the local machine. This is similar to the way the passwd(1) program works. smbpasswd differs from how the passwd program works however in that it is not setuid root but works in a client-server mode and communicates with a locally running smbd(8). As a consequence in order for this to succeed the smbd daemon must be running on the local machine. On a UNIX machine the encrypted SMB passwords are usually stored in the default passdb backend.

When run by an ordinary user with no options, smbpasswd will prompt them for their old SMB password and then ask them for their new password twice, to ensure that the new password was typed correctly. No passwords will be echoed on the screen whilst being typed. If you have a blank SMB password (specified by the string "NO PASSWORD" in the smbpasswd file) then just press the <Enter> key when asked for your old password.

smbpasswd can also be used by a normal user to change their SMB password on remote machines, such as Windows NT Primary Domain Controllers. See the (-r) and -U options below.

When run by root, smbpasswd allows new users to be added and deleted in the smbpasswd file, as well as allows changes to the attributes of the user in this file to be made. When run by root, smbpasswd accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running.

## OPTIONS
-a

This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type <Enter> for the old password). This option is ignored if the username following already exists in the smbpasswd file and it is treated like a regular change password command. Note that the default passdb backends require the user to already exist in the system password file (usually /etc/passwd), else the request to add the user will fail. This option is only available when running smbpasswd as root.

-c

This option can be used to specify the path and file name of the /etc/samba/smb.conf configuration file when it is important to use other than the default file and / or location.

-x

This option specifies that the username following should be deleted from the local smbpasswd file. This option is only available when running smbpasswd as root.

-d

This option specifies that the username following should be disabled in the local smbpasswd file. This is done by writing a 'D' flag into the account control space in the smbpasswd file. Once this is done all attempts to authenticate via SMB using this username will fail. If the smbpasswd file is in the 'old' format (pre-Samba 2.0 format) there is no space in the user's password entry to write this information and the command will FAIL. See smbpasswd(5) for details on the 'old' and new password file formats.

This option is only available when running smbpasswd as root.

-e

This option specifies that the username following should be enabled in the local smbpasswd file, if the account was previously disabled. If the account was not disabled this option has no effect. Once the account is enabled then the user will be able to authenticate via SMB once again. If the smbpasswd file is in the 'old' format, then smbpasswd will FAIL to enable the account. See smbpasswd(5) for details on the 'old' and new password file formats.

This option is only available when running smbpasswd as root.

-D debuglevel

debuglevel is an integer from 0 to 10. The default value if this parameter is not specified is zero. The higher this value, the more detail will be logged to the log files about the activities of smbpasswd. At level 0, only critical errors and serious warnings will be logged.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

-n

This option specifies that the username following should have their password set to null (i.e. a blank password) in the local smbpasswd file. This is done by writing the string "NO PASSWORD" as the first part of the first password stored in the smbpasswd file. Note that to allow users to logon to a Samba server once the password has been set to "NO PASSWORD" in the smbpasswd file the administrator must set the following parameter in the [global] section of the smb.conf file :

null passwords = yes

This option is only available when running smbpasswd as root.

-r remote machine name

This option allows a user to specify what machine they wish to change their password on. Without this parameter smbpasswd defaults to the local host. The remote machine name is the NetBIOS name of the SMB/CIFS server to contact to attempt the password change. This name is resolved into an IP address using the standard name resolution mechanism in all programs of the Samba suite. See the -R name resolve order parameter for details on changing this resolving mechanism. The username whose password is changed is that of the current UNIX logged on user. See the -U username parameter for details on changing the password for a different username.

Note that if changing a Windows NT Domain password the remote machine specified must be the Primary Domain Controller for the domain (Backup Domain Controllers only have a read-only copy of the user account database and will not allow the password change).

Note that Windows 95/98 do not have a real password database so it is not possible to change passwords specifying a Win95/98 machine as remote machine target.

-R name resolve order

This option allows the user of smbpasswd to determine what name resolution services to use when looking up the NetBIOS name of the host being connected to. The options are :"lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:

•lmhosts: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the lmhosts(5) for details) then any name type matches for lookup.

•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 IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored.

•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 without this parameter or any entry in the smb.conf(5) file the name resolution methods will be attempted in this order.

-m

This option tells smbpasswd that the account being changed is a MACHINE account. Currently this is used when Samba is being used as an NT Primary Domain Controller. This option is only available when running smbpasswd as root.

-U username

This option may only be used in conjunction with the -r option. When changing a password on a remote machine it allows the user to specify the user name on that machine whose password will be changed. It is present to allow users who have different user names on different systems to change these passwords.

-h

This option prints the help string for smbpasswd, selecting the correct one for running as root or as an ordinary user.

-s

This option causes smbpasswd to be silent (i.e. not issue prompts) and to read its old and new passwords from standard input, rather than from /dev/tty (like the passwd(1) program does). This option is to aid people writing scripts to drive smbpasswd

-w password

This parameter is only available if Samba has been compiled with LDAP support. The -w switch is used to specify the password to be used with the ldap admin dn. Note that the password is stored in the secrets.tdb and is keyed off of the admin's DN. This means that if the value of ldap admin dn ever changes, the password will need to be manually updated as well.

-W

NOTE: This option is same as "-w" except that the password should be entered using stdin. This parameter is only available if Samba has been compiled with LDAP support. The -W switch is used to specify the password to be used with the ldap admin dn. Note that the password is stored in the secrets.tdb and is keyed off of the admin's DN. This means that if the value of ldap admin dn ever changes, the password will need to be manually updated as well.

-i

This option tells smbpasswd that the account being changed is an interdomain trust account. Currently this is used when Samba is being used as an NT Primary Domain Controller. The account contains the info about another trusted domain. This option is only available when running smbpasswd as root.

-L

Run in local mode.

username

This specifies the username for all of the root only options to operate on. Only root can specify this parameter as only root has the permission needed to modify attributes directly in the local smbpasswd file.

## NOTES
Since smbpasswd works in client-server mode communicating with a local smbd for a non-root user then the smbd daemon must be running for this to work. A common problem is to add a restriction to the hosts that may access the smbd running on the local machine by specifying either allow hosts or deny hosts entry in the smb.conf(5) file and neglecting to allow "localhost" access to the smbd.

In addition, the smbpasswd command is only useful if Samba has been set up to use encrypted passwords.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## SEE ALSO
smbpasswd(5), Samba(7).

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


smbspool

title: smbspool(8)

summary: send a print file to an SMB printer

text:
# smbspool(8)

## NAME
smbspool - send a print file to an SMB printer

## SYNOPSIS
smbspool {job} {user} {title} {copies} {options} [filename]

## DESCRIPTION
This tool is part of the samba(7) suite.

smbspool is a very small print spooling program that sends a print file to an SMB printer. The command-line arguments are position-dependent for compatibility with the Common UNIX Printing System, but you can use smbspool with any printing system or from a program or script.

DEVICE URI

smbspool specifies the destination using a Uniform Resource Identifier ("URI") with a method of "smb". This string can take a number of forms:

•smb://server[:port]/printer

•smb://workgroup/server[:port]/printer

•smb://username:password@server[:port]/printer

•smb://username:password@workgroup/server[:port]/printer

smbspool tries to get the URI from the environment variable DEVICE_URI. If DEVICE_URI is not present, smbspool will use argv[0] if that starts with “smb://” or argv[1] if that is not the case.

Programs using the exec(2) functions can pass the URI in argv[0], while shell scripts must set the DEVICE_URI environment variable prior to running smbspool.

## OPTIONS

•The job argument (argv[1]) contains the job ID number and is presently not used by smbspool.

•The user argument (argv[2]) contains the print user's name and is presently not used by smbspool.

•The title argument (argv[3]) contains the job title string and is passed as the remote file name when sending the print job.

•The copies argument (argv[4]) contains the number of copies to be printed of the named file. If no filename is provided then this argument is not used by smbspool.

•The options argument (argv[5]) contains the print options in a single string and is currently not used by smbspool.

•The filename argument (argv[6]) contains the name of the file to print. If this argument is not specified then the print file is read from the standard input.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## SEE ALSO
smbd(8) and samba(7).

## AUTHOR
smbspool was written by Michael Sweet at Easy Software Products.

The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


eventlogadm

package: samba-common

title: eventlogadm(8)

text:
# eventlogadm(8)

## NAME
eventlogadm - push records into the Samba event log store

## SYNOPSIS
eventlogadm [-s] [-d] [-h] -o addsource EVENTLOG SOURCENAME MSGFILE

eventlogadm [-s] [-d] [-h] -o write EVENTLOG

eventlogadm [-s] [-d] [-h] -o dump EVENTLOG RECORD_NUMBER

## DESCRIPTION
This tool is part of the samba(1) suite.

eventlogadm is a filter that accepts formatted event log records on standard input and writes them to the Samba event log store. Windows client can then manipulate these record using the usual administration tools.

## OPTIONS
-s FILENAME

The -s option causes eventlogadm to load the configuration file given as FILENAME instead of the default one used by Samba.

-d

The -d option causes eventlogadm to emit debugging information.

-o addsource EVENTLOG SOURCENAME MSGFILE

The -o addsource option creates a new event log source.

-o write EVENTLOG

The -o write reads event log records from standard input and writes them to the Samba event log store named by EVENTLOG.

-o dump EVENTLOG RECORD_NUMBER

The -o dump reads event log records from a EVENTLOG tdb and dumps them to standard output on screen.

-h

Print usage information.

## EVENTLOG RECORD FORMAT
For the write operation, eventlogadm expects to be able to read structured records from standard input. These records are a sequence of lines, with the record key and data separated by a colon character. Records are separated by at least one or more blank line.

The event log record field are:

•LEN - This field should be 0, since eventlogadm will calculate this value.

•RS1 - This must be the value 1699505740.

•RCN - This field should be 0.

•TMG - The time the eventlog record was generated; format is the number of seconds since 00:00:00 January 1, 1970, UTC.

•TMW - The time the eventlog record was written; format is the number of seconds since 00:00:00 January 1, 1970, UTC.

•EID - The eventlog ID.

•ETP - The event type -- one of "INFO", "ERROR", "WARNING", "AUDIT SUCCESS" or "AUDIT FAILURE".

•ECT - The event category; this depends on the message file. It is primarily used as a means of filtering in the eventlog viewer.

•RS2 - This field should be 0.

•CRN - This field should be 0.

•USL - This field should be 0.

•SRC - This field contains the source name associated with the event log. If a message file is used with an event log, there will be a registry entry for associating this source name with a message file DLL.

•SRN - The name of the machine on which the eventlog was generated. This is typically the host name.

•STR - The text associated with the eventlog. There may be more than one string in a record.

•DAT - This field should be left unset.

## EXAMPLES
An example of the record format accepted by eventlogadm:

```
	LEN: 0
	RS1: 1699505740
	RCN: 0
	TMG: 1128631322
	TMW: 1128631322
	EID: 1000
	ETP: INFO
	ECT: 0
	RS2: 0
	CRN: 0
	USL: 0
	SRC: cron
	SRN: dmlinux
	STR: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)
	DAT:

```

Set up an eventlog source, specifying a message file DLL:

```
	eventlogadm -o addsource Application MyApplication | \\
	    	%SystemRoot%/system32/MyApplication.dll

```

Filter messages from the system log into an event log:

```
	tail -f /var/log/messages | \\
		my_program_to_parse_into_eventlog_records | \\
	      	eventlogadm SystemLogEvents

```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


nmbd

title: nmbd(8)

text:
# nmbd(8)

## NAME
nmbd - NetBIOS name server to provide NetBIOS over IP naming services to clients

## SYNOPSIS
nmbd [-D|--daemon] [-i|--interactive] [-F|--foreground] [--no-process-group] [-b|--build-options] [-p <port number(s)>] [-P <profiling level>] [-d <debug level>] [--debug-stdout] [--configfile=<configuration file>] [--option=<name>=<value>] [-l|--log-basename <log directory>] [--leak-report] [--leak-report-full] [-V|--version]

## DESCRIPTION
This program is part of the samba(7) suite.

nmbd is a server that understands and can reply to NetBIOS over IP name service requests, like those produced by SMB/CIFS clients such as Windows 95/98/ME, Windows NT, Windows 2000, Windows XP and LanManager clients. It also participates in the browsing protocols which make up the Windows "Network Neighborhood" view.

SMB/CIFS clients, when they start up, may wish to locate an SMB/CIFS server. That is, they wish to know what IP number a specified host is using.

Amongst other services, nmbd will listen for such requests, and if its own NetBIOS name is specified it will respond with the IP number of the host it is running on. Its "own NetBIOS name" is by default the primary DNS name of the host it is running on, but this can be overridden by the netbios name in /etc/samba/smb.conf. Thus nmbd will reply to broadcast queries for its own name(s). Additional names for nmbd to respond on can be set via parameters in the smb.conf(5) configuration file.

nmbd can also be used as a WINS (Windows Internet Name Server) server. What this basically means is that it will act as a WINS database server, creating a database from name registration requests that it receives and replying to queries from clients for these names.

In addition, nmbd can act as a WINS proxy, relaying broadcast queries from clients that do not understand how to talk the WINS protocol to a WINS server.

## OPTIONS
-D|--daemon

If specified, this parameter causes nmbd to operate as a daemon. That is, it detaches itself and runs in the background, fielding requests on the appropriate port. By default, nmbd will operate as a daemon if launched from a command shell. nmbd can also be operated from the inetd meta-daemon, although this is not recommended.

-F|--foreground

If specified, this parameter causes the main nmbd process to not daemonize, i.e. double-fork and disassociate with the terminal. Child processes are still created as normal to service each connection request, but the main process does not exit. This operation mode is suitable for running nmbd under process supervisors such as supervise and svscan from Daniel J. Bernstein's daemontools package, or the AIX process monitor.

-i|--interactive

If this parameter is specified it causes the server to run "interactively", not as a daemon, even if the server is executed on the command line of a shell. Setting this parameter negates the implicit daemon mode when run from the command line. nmbd also logs to standard output, as if the -S parameter had been given.

-H|--hosts <filename>

NetBIOS lmhosts file. The lmhosts file is a list of NetBIOS names to IP addresses that is loaded by the nmbd server and used via the name resolution mechanism name resolve order described in smb.conf(5) to resolve any NetBIOS name queries needed by the server. Note that the contents of this file are NOT used by nmbd to answer any name queries. Adding a line to this file affects name NetBIOS resolution from this host ONLY. The default path to this file is compiled into Samba as part of the build process. Common defaults are /usr/local/samba/lib/lmhosts, /usr/samba/lib/lmhosts or /etc/samba/lmhosts. See the lmhosts(5) man page for details on the contents of this file.

-p|--port <UDP port number>

UDP port number is a positive integer value. This option changes the default UDP port number (normally 137) that nmbd responds to name queries on. Don't use this option unless you are an expert, in which case you won't need help!

--no-process-group

Do not create a new process group for nmbd.

-d|--debuglevel=DEBUGLEVEL, --debug-stdout

level is an integer from 0 to 10. The default value if this parameter is not specified is 0. The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

Note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file. This will redirect debug output to STDOUT. By default server daemons are logging to a log file.

--configfile=CONFIGFILE

The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See /etc/samba/smb.conf for more information. The default configuration file name is determined at compile time.

--option=<name>=<value>

Set the smb.conf(5) option "<name>" to value "<value>" from the command line. This overrides compiled-in defaults and options read from the configuration file. If a name or a value includes a space, wrap whole --option=name=value into quotes.

-l|--log-basename=logdirectory

Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.

--leak-report

Enable talloc leak reporting on exit.

--leak-report-full

Enable full talloc leak reporting on exit.

-V|--version

Prints the program version number.

-?|--help

Print a summary of command line options.

--usage

Display brief usage message.

## FILES
/etc/inetd.conf

If the server is to be run by the inetd meta-daemon, this file must contain suitable startup information for the meta-daemon.

/etc/rc

or whatever initialization script your system uses). If running the server as a daemon at startup, this file will need to contain an appropriate startup sequence for the server.

/etc/services

If running the server via the meta-daemon inetd, this file must contain a mapping of service name (e.g., netbios-ssn) to service port (e.g., 139) and protocol type (e.g., tcp).

/usr/local/samba/lib/smb.conf

This is the default location of the smb.conf(5) server configuration file. Other common places that systems install this file are /usr/samba/lib/smb.conf and /etc/samba/smb.conf. When run as a WINS server (see the wins support parameter in the smb.conf(5) man page), nmbd will store the WINS database in the file wins.dat in the var/locks directory configured under wherever Samba was configured to install itself.

If nmbd is acting as a browse master (see the local master parameter in the smb.conf(5) man page, nmbd will store the browsing database in the file browse.dat in the var/locks directory configured under wherever Samba was configured to install itself.

## SIGNALS
To shut down an nmbd process it is recommended that SIGKILL (-9) NOT be used, except as a last resort, as this may leave the name database in an inconsistent state. The correct way to terminate nmbd is to send it a SIGTERM (-15) signal and wait for it to die on its own.

nmbd will accept SIGHUP, which will cause it to dump out its namelists into the file namelist.debug in the /usr/local/samba/var/locks directory (or the var/locks directory configured under wherever Samba was configured to install itself). This will also cause nmbd to dump out its server database in the log.nmb file. Additionally, the signal will cause reloading nmbd configuration.

Instead of sending a SIGHUP signal, a request to dump namelists into the file and reload a configuration file may be sent using smbcontrol(1) program.

The debug log level of nmbd may be raised or lowered using smbcontrol(1) (SIGUSR[1|2] signals are no longer used since Samba 2.2). This is to allow transient problems to be diagnosed, whilst still running at a normally low log level.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## SEE ALSO
inetd(8), smbd(8), smb.conf(5), smbclient(1), testparm(1), and the Internet RFC's rfc1001.txt, rfc1002.txt. In addition the CIFS (formerly SMB) specification is available as a link from the Web page https://www.samba.org/cifs/.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


samba-bgqd

title: samba-bgqd(8)

summary: This is an internal helper program performing asynchronous printing\-related jobs.

text:
# samba-bgqd(8)

## NAME
samba-bgqd - This is an internal helper program performing asynchronous printing-related jobs.

## SYNOPSIS
samba-bgqd

## DESCRIPTION
This tool is part of the samba(7) suite.

samba-bgqd is an helper program to be spawned by smbd or spoolssd to perform jobs like updating the printer list or other management tasks asynchronously on demand. It is not intended to be called by users or administrators.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


smbd

title: smbd(8)

text:
# smbd(8)

## NAME
smbd - server to provide SMB/CIFS services to clients

## SYNOPSIS
smbd [-D|--daemon] [-i|--interactive] [-F|--foreground] [--no-process-group] [-b|--build-options] [-p <port number(s)>] [-P <profiling level>] [-d <debug level>] [--debug-stdout] [--configfile=<configuration file>] [--option=<name>=<value>] [-l|--log-basename <log directory>] [--leak-report] [--leak-report-full] [-V|--version]

## DESCRIPTION
This program is part of the samba(7) suite.

smbd is the server daemon that provides filesharing and printing services to Windows clients. The server provides filespace and printer services to clients using the SMB (or CIFS) protocol. This is compatible with the LanManager protocol, and can service LanManager clients. These include MSCLIENT 3.0 for DOS, Windows for Workgroups, Windows 95/98/ME, Windows NT, Windows 2000, OS/2, DAVE for Macintosh, and smbfs for Linux.

An extensive description of the services that the server can provide is given in the man page for the configuration file controlling the attributes of those services (see smb.conf(5). This man page will not describe the services, but will concentrate on the administrative aspects of running the server.

Please note that there are significant security implications to running this server, and the smb.conf(5) manual page should be regarded as mandatory reading before proceeding with installation.

A session is created whenever a client requests one. Each client gets a copy of the server for each session. This copy then services all connections made by the client during that session. When all connections from its client are closed, the copy of the server for that client terminates.

The configuration file, and any files that it includes, are automatically reloaded every three minutes, if they change. One can force a reload by sending a SIGHUP to the server. Reloading the configuration file will not affect connections to any service that is already established. Either the user will have to disconnect from the service, or smbd killed and restarted.

Instead of sending a SIGHUP signal, a request to reload configuration file may be sent using smbcontrol(1) program.

## OPTIONS
-D|--daemon

If specified, this parameter causes the server to operate as a daemon. That is, it detaches itself and runs in the background, fielding requests on the appropriate port. Operating the server as a daemon is the recommended way of running smbd for servers that provide more than casual use file and print services. This switch is assumed if smbd is executed on the command line of a shell.

-i|--interactive

If this parameter is specified it causes the server to run "interactively", not as a daemon, even if the server is executed on the command line of a shell. Setting this parameter negates the implicit daemon mode when run from the command line. smbd will only accept one connection and terminate. It will also log to standard output, as if the -S parameter had been given.

-F|--foreground

If specified, this parameter causes the main smbd process to not daemonize, i.e. double-fork and disassociate with the terminal. Child processes are still created as normal to service each connection request, but the main process does not exit. This operation mode is suitable for running smbd under process supervisors such as supervise and svscan from Daniel J. Bernstein's daemontools package, or the AIX process monitor.

--no-process-group

Do not create a new process group for smbd.

-b|--build-options

Prints information about how Samba was built.

-p|--port<port number(s)>

port number(s) is a space or comma-separated list of TCP ports smbd should listen on. The default value is taken from the ports parameter in /etc/samba/smb.conf The default ports are 139 (used for SMB over NetBIOS over TCP) and port 445 (used for plain SMB over TCP).

-P|--profiling-level<profiling level>

profiling level is a number specifying the level of profiling data to be collected. 0 turns off profiling, 1 turns on counter profiling only, 2 turns on complete profiling, and 3 resets all profiling data.

-d|--debuglevel=DEBUGLEVEL, --debug-stdout

level is an integer from 0 to 10. The default value if this parameter is not specified is 0. The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.

Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.

Note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file. This will redirect debug output to STDOUT. By default server daemons are logging to a log file.

--configfile=CONFIGFILE

The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See /etc/samba/smb.conf for more information. The default configuration file name is determined at compile time.

--option=<name>=<value>

Set the smb.conf(5) option "<name>" to value "<value>" from the command line. This overrides compiled-in defaults and options read from the configuration file. If a name or a value includes a space, wrap whole --option=name=value into quotes.

-l|--log-basename=logdirectory

Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never removed by the client.

--leak-report

Enable talloc leak reporting on exit.

--leak-report-full

Enable full talloc leak reporting on exit.

-V|--version

Prints the program version number.

-?|--help

Print a summary of command line options.

--usage

Display brief usage message.

## FILES
/etc/inetd.conf

If the server is to be run by the inetd meta-daemon, this file must contain suitable startup information for the meta-daemon.

/etc/rc

or whatever initialization script your system uses). If running the server as a daemon at startup, this file will need to contain an appropriate startup sequence for the server.

/etc/services

If running the server via the meta-daemon inetd, this file must contain a mapping of service name (e.g., netbios-ssn) to service port (e.g., 139) and protocol type (e.g., tcp).

/usr/local/samba/lib/smb.conf

This is the default location of the smb.conf(5) server configuration file. Other common places that systems install this file are /usr/samba/lib/smb.conf and /etc/samba/smb.conf. This file describes all the services the server is to make available to clients. See smb.conf(5) for more information.

## LIMITATIONS
On some systems smbd cannot change uid back to root after a setuid() call. Such systems are called trapdoor uid systems. If you have such a system, you will be unable to connect from a client (such as a PC) as two different users at once. Attempts to connect the second user will result in access denied or similar.

## ENVIRONMENT VARIABLES
PRINTER

If no printer name is specified to printable services, most systems will use the value of this variable (or lp if this variable is not defined) as the name of the printer to use. This is not specific to the server, however.

## PAM INTERACTION
Samba uses PAM for authentication (when presented with a plaintext password), for account checking (is this account disabled?) and for session management. The degree too which samba supports PAM is restricted by the limitations of the SMB protocol and the obey pam restrictions smb.conf(5) parameter. When this is set, the following restrictions apply:

•Account Validation: All accesses to a samba server are checked against PAM to see if the account is valid, not disabled and is permitted to login at this time. This also applies to encrypted logins.

•Session Management: When not using share level security, users must pass PAM's session checks before access is granted. Note however, that this is bypassed in share level security. Note also that some older pam configuration files may need a line added for session support.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## DIAGNOSTICS
Most diagnostics issued by the server are logged in a specified log file. The log file name is specified at compile time, but may be overridden on the command line.

The number and nature of diagnostics available depends on the debug level used by the server. If you have problems, set the debug level to 3 and peruse the log files.

Most messages are reasonably self-explanatory. Unfortunately, at the time this man page was created, there are too many diagnostics available in the source code to warrant describing each and every diagnostic. At this stage your best bet is still to grep the source code and inspect the conditions that gave rise to the diagnostics you are seeing.

## TDB FILES
Samba stores it's data in several TDB (Trivial Database) files, usually located in /var/lib/samba.

(*) information persistent across restarts (but not necessarily important to backup).

account_policy.tdb*

NT account policy settings such as pw expiration, etc...

brlock.tdb

byte range locks

browse.dat

browse lists

gencache.tdb

generic caching db

group_mapping.tdb*

group mapping information

locking.tdb

share modes & oplocks

login_cache.tdb*

bad pw attempts

messages.tdb

Samba messaging system

netsamlogon_cache.tdb*

cache of user net_info_3 struct from net_samlogon() request (as a domain member)

ntdrivers.tdb*

installed printer drivers

ntforms.tdb*

installed printer forms

ntprinters.tdb*

installed printer information

printing/

directory containing tdb per print queue of cached lpq output

registry.tdb

Windows registry skeleton (connect via regedit.exe)

smbXsrv_session_global.tdb

session information (e.g. support for 'utmp = yes')

smbXsrv_tcon_global.tdb

share connections (used to enforce max connections, etc...)

smbXsrv_open_global.tdb

open file handles (used durable handles, etc...)

share_info.tdb*

share acls

winbindd_cache.tdb

winbindd's cache of user lists, etc...

winbindd_idmap.tdb*

winbindd's local idmap db

wins.dat*

wins database when 'wins support = yes'

## SIGNALS
Sending the smbd a SIGHUP will cause it to reload its smb.conf configuration file within a short period of time.

To shut down a user's smbd process it is recommended that SIGKILL (-9) NOT be used, except as a last resort, as this may leave the shared memory area in an inconsistent state. The safe way to terminate an smbd is to send it a SIGTERM (-15) signal and wait for it to die on its own.

The debug log level of smbd may be raised or lowered using smbcontrol(1) program (SIGUSR[1|2] signals are no longer used since Samba 2.2). This is to allow transient problems to be diagnosed, whilst still running at a normally low log level.

Note that as the signal handlers send a debug write, they are not re-entrant in smbd. This you should wait until smbd is in a state of waiting for an incoming SMB before issuing them. It is possible to make the signal handlers safe by un-blocking the signals before the select call and re-blocking them after, however this would affect performance.

## SEE ALSO
hosts_access(5), inetd(8), nmbd(8), smb.conf(5), smbclient(1), testparm(1), and the Internet RFC's rfc1001.txt, rfc1002.txt. In addition the CIFS (formerly SMB) specification is available as a link from the Web page https://www.samba.org/cifs/.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_acl_tdb(8)

summary: Save NTFS\-ACLs in a tdb file

text:
# vfs_acl_tdb(8)

## NAME
vfs_acl_tdb - Save NTFS-ACLs in a tdb file

## SYNOPSIS
vfs objects = acl_tdb

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_acl_tdb VFS module stores NTFS Access Control Lists (ACLs) in a tdb file. This enables the full mapping of Windows ACLs on Samba servers.

The ACL settings are stored in $LOCKDIR/file_ntacls.tdb.

This module forces the following parameters:

•inherit acls = true

•dos filemode = true

•force unknown acl user = true

This module is stackable.

## OPTIONS
acl_tdb:ignore system acls = [yes|no]

When set to yes, a best effort mapping from/to the POSIX ACL layer will not be done by this module. The default is no, which means that Samba keeps setting and evaluating both the system ACLs and the NT ACLs. This is better if you need your system ACLs be set for local or NFS file access, too. If you only access the data via Samba you might set this to yes to achieve better NT ACL compatibility. If acl_tdb:ignore system acls is set to yes, the following additional settings will be enforced:

•create mask = 0666

•directory mask = 0777

•map archive = no

•map hidden = no

•map readonly = no

•map system = no

•store dos attributes = yes

acl_tdb:default acl style = [posix|windows|everyone]

This parameter determines the type of ACL that is synthesized in case a file or directory lacks an security.NTACL xattr. When set to posix, an ACL will be synthesized based on the POSIX mode permissions for user, group and others, with an additional ACE for NT Authority\SYSTEM will full rights.

When set to windows, an ACL is synthesized the same way Windows does it, only including permissions for the owner and NT Authority\SYSTEM.

When set to everyone, an ACL is synthesized giving full permissions to everyone (S-1-1-0).

The default for this option is posix.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_acl_xattr(8)

summary: Save NTFS\-ACLs in Extended Attributes (EAs)

text:
# vfs_acl_xattr(8)

## NAME
vfs_acl_xattr - Save NTFS-ACLs in Extended Attributes (EAs)

## SYNOPSIS
vfs objects = acl_xattr

## DESCRIPTION
This VFS module is part of the samba(7) suite.

This module is made for systems which do not support standardized NFS4 ACLs but only a deprecated POSIX ACL draft implementation. This is usually the case on Linux systems. Systems that do support just use NFSv4 ACLs directly instead of this module. Such support is usually provided by the filesystem VFS module specific to the underlying filesystem that supports NFS4 ACLs

The vfs_acl_xattr VFS module stores NTFS Access Control Lists (ACLs) in Extended Attributes (EAs). This enables the full mapping of Windows ACLs on Samba servers even if the ACL implementation is not capable of doing so.

The NT ACLs are stored in the security.NTACL extended attribute of files and directories in a form containing the Windows SID representing the users and groups in the ACL. This is different from the uid and gids stored in local filesystem ACLs and the mapping from users and groups to Windows SIDs must be consistent in order to maintain the meaning of the stored NT ACL That extended attribute is not listed by the Linux command getfattr -d filename. To show the current value, the name of the EA must be specified (e.g. getfattr -n security.NTACL filename).

This module forces the following parameters:

•inherit acls = true

•dos filemode = true

•force unknown acl user = true

This module is stackable.

## OPTIONS
acl_xattr:security_acl_name = NAME

This option allows to redefine the default location for the NTACL extended attribute (xattr). If not set, NTACL xattrs are written to security.NTACL which is a protected location, which means the content of the security.NTACL attribute is not accessible from normal users outside of Samba. When this option is set to use a user-defined value, e.g. user.NTACL then any user can potentially access and overwrite this information. The module prevents access to this xattr over SMB, but the xattr may still be accessed by other means (eg local access, SSH, NFS). This option must only be used when this consequence is clearly understood and when specific precautions are taken to avoid compromising the ACL content.

acl_xattr:ignore system acls = [yes|no]

When set to yes, a best effort mapping from/to the POSIX draft ACL layer will not be done by this module. The default is no, which means that Samba keeps setting and evaluating both the system ACLs and the NT ACLs. This is better if you need your system ACLs be set for local or NFS file access, too. If you only access the data via Samba you might set this to yes to achieve better NT ACL compatibility. If acl_xattr:ignore system acls is set to yes, the following additional settings will be enforced:

•create mask = 0666

•directory mask = 0777

•map archive = no

•map hidden = no

•map readonly = no

•map system = no

•store dos attributes = yes

acl_xattr:default acl style = [posix|windows|everyone]

This parameter determines the type of ACL that is synthesized in case a file or directory lacks an security.NTACL xattr. When set to posix, an ACL will be synthesized based on the POSIX mode permissions for user, group and others, with an additional ACE for NT Authority\SYSTEM will full rights.

When set to windows, an ACL is synthesized the same way Windows does it, only including permissions for the owner and NT Authority\SYSTEM.

When set to everyone, an ACL is synthesized giving full permissions to everyone (S-1-1-0).

The default for this option is posix.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_aio_fork(8)

summary: implement async I/O in Samba vfs

text:
# vfs_aio_fork(8)

## NAME
vfs_aio_fork - implement async I/O in Samba vfs

## SYNOPSIS
vfs objects = aio_fork

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The aio_fork VFS module enables async I/O for Samba on platforms where the system level Posix AIO interface is insufficient. Posix AIO can suffer from severe limitations. For example, on some Linux versions the real-time signals that it uses are broken under heavy load. Other systems only allow AIO when special kernel modules are loaded or only allow a certain system-wide amount of async requests being scheduled. Systems based on glibc (most Linux systems) only allow a single outstanding request per file descriptor.

To work around all these limitations, the aio_fork module was written. It uses forked helper processes instead of the internal Posix AIO interface to create asynchronousity for read and write calls. It has no parameters, it will create helper processes when async requests come in as needed. Idle helper processes will be removed every 30 seconds.

This module is stackable.

## EXAMPLES
Straight forward use:

```
        [cooldata]
	path = /data/ice
	vfs objects = aio_fork
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_aio_pthread(8)

text:
# vfs_aio_pthread(8)

## NAME
vfs_aio_pthread - implement async open in Samba vfs using a pthread pool

## SYNOPSIS
vfs objects = aio_pthread

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The aio_pthread VFS module enables asynchronous opens (for new files) with aio_pthread:aio open = yes on platforms which have the pthreads API available, support the openat() syscall and support per thread credentials (modern Linux kernels).

The module makes use of the global thread pool which uses the aio max threads option.

This module MUST be listed last in any module stack as the Samba VFS open interface is not thread-safe. This module makes direct openat() system calls and does NOT call the Samba VFS open interfaces.

## EXAMPLES
Straight forward use:

```
        [cooldata]
	path = /data/ice
	vfs objects = aio_pthread
	aio_pthread:aio open = yes
```

## OPTIONS
aio_pthread:aio open = BOOL

Try async opens for creating new files. The default is 'no'.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_audit(8)

text:
# vfs_audit(8)

## NAME
vfs_audit - record selected Samba VFS operations in the system log

## SYNOPSIS
vfs objects = audit

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_audit VFS module records selected client operations to the system log using syslog(3).

The following Samba VFS operations are recorded:

connect

disconnect

opendir

mkdir

rmdir

open

close

rename

unlink

chmod

fchmod

This module is stackable.

## OPTIONS
audit:facility = FACILITY

Log messages to the named syslog(3) facility.

audit:priority = PRIORITY

Log messages with the named syslog(3) priority.

## EXAMPLES
Log operations on all shares using the LOCAL1 facility and NOTICE priority:

```
        [global]
	vfs objects = audit
	audit:facility = LOCAL1
	audit:priority = NOTICE
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_btrfs(8)

text:
# vfs_btrfs(8)

## NAME
vfs_btrfs - Utilize features provided by the Btrfs filesystem

## SYNOPSIS
vfs objects = btrfs

## DESCRIPTION
This VFS module is part of the samba(8) suite.

The vfs_btrfs VFS module exposes Btrfs specific features for use by Samba.

Btrfs allows for multiple files to share the same on-disk data through the use cloned ranges. When an SMB client issues a request to copy duplicate data (via FSCTL_SRV_COPYCHUNK), this module maps the request to a Btrfs clone range IOCTL, instead of performing reads and writes required by a traditional copy. Doing so saves storage capacity and greatly reduces disk IO.

This module also exposes Btrfs per-file compression support to SMB clients via the get/set compression fsctls.

Btrfs snapshots can be manipulated by Samba's FSRVP server. Snapshot manipulation using this module is currently considered experimental, and is therefore disabled by default. The vfs_snapper module is instead recommended for this purpose.

This module is stackable.

## OPTIONS
btrfs: manipulate snapshots = [yes|no]

When set to yes, experimental support for the creation and deletion of snapshots via corresponding Btrfs IOCTLs will be enabled. The default is no, which means that such requests are passed through to any underlying VFS module.

## CONFIGURATION
vfs_btrfs requires that the underlying share path is a Btrfs subvolume.

```
		[share]
		vfs objects = btrfs
		btrfs: manipulate snapshots = no

```

To use the experimental snapshot manipulation functionality provided by this module, it must be explicitly enabled, and Samba's FSRVP server must be running.

The vfs_shadow_copy module can be used to expose snapshots created by vfs_btrfs to Windows Explorer as file / directory "previous versions".

```
		[global]
		registry shares = yes
		include = registry
		[share]
		vfs objects = btrfs shadow_copy
		btrfs: manipulate snapshots = yes

```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_cap(8)

summary: CAP encode filenames

text:
# vfs_cap(8)

## NAME
vfs_cap - CAP encode filenames

## SYNOPSIS
vfs objects = cap

## DESCRIPTION
This VFS module is part of the samba(7) suite.

CAP (Columbia Appletalk Protocol) encoding is a technique for representing non-ASCII filenames in ASCII. The vfs_cap VFS module translates filenames to and from CAP format, allowing users to name files in their native encoding.

CAP encoding is most commonly used in Japanese language environments.

This module is stackable.

## EXAMPLES
On a system using GNU libiconv, use CAP encoding to support users in the Shift_JIS locale:

```
        [global]
	dos charset = CP932
	dos charset = CP932
	vfs objects = cap
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_catia(8)

text:
# vfs_catia(8)

## NAME
vfs_catia - translate illegal characters in Catia filenames

## SYNOPSIS
vfs objects = catia

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The Catia CAD package commonly creates filenames that use characters that are illegal in CIFS filenames. The vfs_catia VFS module implements a character mapping so that these files can be shared with CIFS clients.

This module is stackable.

The parameter "catia:mappings" specifies the mapping on a per-character basis, see below.

## OPTIONS
catia:mappings = SERVER_HEX_CHAR:CLIENT_HEX_CHAR

SERVER_HEX_CHAR specifies a 0x prefixed hexedecimal character code that, when included in a Samba server-side filename, will be mapped to CLIENT_HEX_CHAR for the CIFS client. The same mapping occurs in the opposite direction. Multiple character mappings are separated by a comma.

## EXAMPLES
Map server-side quotation-marks (") to client-side diaeresis (¨) on filenames in the [CAD] share:

```
        [CAD]
	path = /data/cad
	vfs objects = catia
	catia:mappings = 0x22:0xa8
```

Perform comprehensive mapping of common Catia filename characters:

```
        [CAD]
	path = /data/cad
	vfs objects = catia
	catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3c:0xab,0x3e:0xbb,0x3f:0xbf,0x5c:0xff,0x7c:0xa6
```

Server-side filename to be translated (Note that the path delimiter "/" is not used here):

a\a:a*a?a"a<a>a|a

Resulting filename, as seen by the client:

aÿa÷a¤a¿a¨a«a»a¦a

## CAVEATS
Character mapping must work in BOTH directions (server -> client and client -> server) to get unique and existing file names!

A NOT working example:

```
        [CAD]
	path = /data/cad
	vfs objects = catia
	catia:mappings = 0x3a:0x5f
```

Here the colon ":" is mapped to the underscore "_".

Assuming a server-side filename "a:should_work", which is translated to "a_should_work" for the client.

BUT the reverse mapping from client "a_should_work" to server will result in "a:should:work" - something like "file not found" will be returned.

## VERSION
This man page is part of Samba versions from 3.5.0 to 4.0.6.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.

New version written by Guenter Kukkukk kukks@samba.org


title: vfs_commit(8)

summary: flush dirty data at specified intervals

text:
# vfs_commit(8)

## NAME
vfs_commit - flush dirty data at specified intervals

## SYNOPSIS
vfs objects = commit

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_commit VFS module keeps track of the amount of data written to a file and synchronizes it to disk when a specified amount accumulates.

vfs_commit is useful in two circumstances. First, if you have very precious data, the impact of unexpected power loss can be minimized by a small commit:dthresh value. Secondly, write performance can be improved on some systems by flushing file data early and at regular intervals.

This module is stackable.

## OPTIONS
commit:dthresh = BYTES

Synchronize file data each time the specified number of bytes has been written. The following suffixes may be applied to BYTES:

•K - BYTES is a number of kilobytes

•M - BYTES is a number of megabytes

•G - BYTES is a number of gigabytes

## EXAMPLES
Synchronize the file data on the [precious] share after every 512 kilobytes (524288 bytes) of data is written:

```
        [precious]
	path = /data/precious
	vfs objects = commit
	commit:dthresh = 512K
```

## CAVEATS
On some systems, the data synchronization performed by commit may reduce performance.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_crossrename(8)

text:
# vfs_crossrename(8)

## NAME
vfs_crossrename - server side rename files across filesystem boundaries

## SYNOPSIS
vfs objects = crossrename

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_crossrename VFS module allows server side rename operations even if source and target are on different physical devices. A "move" in Explorer is usually a rename operation if it is inside of a single share or device. Usually such a rename operation returns NT_STATUS_NOT_SAME_DEVICE and the client has to move the file by manual copy and delete operations. If the rename by copy is done by the server this can be much more efficient. vfs_crossrename tries to do this server-side cross-device rename operation.

There are however limitations that this module currently does not solve:

The ACLs of files are not preserved,

meta data in EAs are not preserved,

renames of whole subdirectories cannot be done recursively, in that case we still return STATUS_NOT_SAME_DEVICE and let the client decide what to do,

rename operations of huge files can cause hangs on the client because clients expect a rename operation to return fast.

This module is stackable.

## OPTIONS
crossrename:sizelimit = BYTES

server-side cross-device-renames are only done for files if the filesize is not larger than the defined size in MiB to prevent timeouts. The default sizelimit is 20 (MiB)

## EXAMPLES
To add server-side cross-device renames inside of a share for all files sized up to 50MB:

```
        [testshare]
	path = /data/mounts
	vfs objects = crossrename
	crossrename:sizelimit = 50
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_default_quota(8)

text:
# vfs_default_quota(8)

## NAME
vfs_default_quota - store default quota records for Windows clients

## SYNOPSIS
vfs objects = default_quota

## DESCRIPTION
This VFS module is part of the samba(7) suite.

Many common quota implementations only store quotas for users and groups, but do not store a default quota. The vfs_default_quota module allows Samba to store default quota values which can be examined using the Windows Explorer interface.

By default, Samba returns NO_LIMIT the default quota and refuses to update them. vfs_default_quota maps the default quota to the quota record of a user. By default the root user is taken because quota limits for root are typically not enforced.

This module is stackable.

## OPTIONS
default_quota:uid = UID

UID specifies the user ID of the quota record where the default user quota values are stored.

default_quota:gid = GID

GID specifies the group ID of the quota record where the default group quota values are stored.

default_quota:uid nolimit = BOOL

If this parameter is True, then the user whose quota record is storing the default user quota will be reported as having a quota of NO_LIMIT. Otherwise, the stored values will be reported.

default_quota:gid nolimit = BOOL

If this parameter is True, then the group whose quota record is storing the default group quota will be reported as having a quota of NO_LIMIT. Otherwise, the stored values will be reported.

## EXAMPLES
Store the default quota record in the quota record for the user with ID 65535 and report that user as having no quota limits:

```
        [global]
	vfs objects = default_quota
	default_quota:uid = 65535
	default_quota:uid nolimit = yes
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_dirsort(8)

summary: Sort directory contents

text:
# vfs_dirsort(8)

## NAME
vfs_dirsort - Sort directory contents

## SYNOPSIS
vfs objects = dirsort

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_dirsort module sorts directory entries alphabetically before sending them to the client.

Please be aware that adding this module might have negative performance implications for large directories.

## EXAMPLES
Sort directories for all shares:

```
        [global]
	vfs objects = dirsort
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_expand_msdfs(8)

text:
# vfs_expand_msdfs(8)

## NAME
vfs_expand_msdfs - Expand msdfs links depending on client IP

## SYNOPSIS
vfs objects = expand_msdfs

## DESCRIPTION
This VFS module is part of the samba(7) suite.

With this module, the link target is not directly a server and share, but this module expects the target to reference a file, containing a table. The file is referenced by means of the msdfs symlink target according to msdfs:@table-filename@/share. The file table-filename is supposed to contain a list of destinations that are looked at from top to bottom:

```
192.168.234 local.samba.org
192.168 remote.samba.org

 default.samba.org

```

With this, clients from network 192.168.234/24 are redirected to host local.samba.org, clients from 192.168/16 are redirected to remote.samba.org and all other clients go to default.samba.org.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_extd_audit(8)

summary: record selected Samba VFS operations

text:
# vfs_extd_audit(8)

## NAME
vfs_extd_audit - record selected Samba VFS operations

## SYNOPSIS
vfs objects = extd_audit

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The extd_audit VFS module records selected client operations to both the smbd(8) log and system log (using syslog(3)).

Other than logging to the smbd(8) log, vfs_extd_audit is identical to vfs_audit(8).

This module is stackable.

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.


title: vfs_fake_perms(8)

summary: enable read only Roaming Profiles

text:
# vfs_fake_perms(8)

## NAME
vfs_fake_perms - enable read only Roaming Profiles

## SYNOPSIS
vfs objects = fake_perms

## DESCRIPTION
This VFS module is part of the samba(7) suite.

The vfs_fake_perms VFS module was created to allow Roaming Profile files and directories to be set (on the Samba server under UNIX) as read only. This module will, if installed on the Profiles share, report to the client that the Profile files and directories are writeable. This satisfies the client even though the files will never be overwritten as the client logs out or shuts down.

This module is stackable.

## EXAMPLES

```
        [Profiles]
	path = /profiles
	vfs objects = fake_perms
```

## VERSION
This man page is part of version 4.19.9-alt12 of the Samba suite.

## AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.