samba-tool — Main Samba administration tool.
samba-tool
[-h] [-W myworkgroup] [-U user] [-d debuglevel] [--v]
Show this help message and exit
Set the realm name
DN to use for a simple bind
Password
Username
Workgroup
Don't ask for a password
Use Kerberos
IP address of the server
level
is an integer
from 0 to 10. The default value if this parameter is
not specified is 1.
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 smb.conf
file.
Prints the program version number.
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 smb.conf
for more information.
The default configuration file name is determined at
compile time.
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.
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.
computername
[options]Create a new computer in the Active Directory Domain.
The new computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign.
DN of alternative location (with or without domainDN counterpart) to default CN=Computers in which new computer object will be created. E.g. 'OU=OUname'.
The new computers's description.
IPv4 address for the computer's A record, or IPv6 address for AAAA record, can be provided multiple times.
Computer's Service Principal Name, can be provided multiple times.
Prepare enabled machine account for oldjoin mechanism.
computername
[options]Delete an existing computer account.
The computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign.
computername
new_parent_dn
[options]This command moves a computer account into the specified organizational unit or container.
The computername specified on the command is the sAMAccountName, with or without the trailing dollar sign.
The name of the organizational unit or container can be specified as a full DN or without the domainDN component.
computername
[options]Display a computer AD object.
The computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign.
Comma separated list of attributes, which will be printed.
accountname
principal
[options]Add a service principal as msDS-AllowedToDelegateTo.
accountname
principal
[options]Delete a service principal as msDS-AllowedToDelegateTo.
accountname
[(on|off)] [options]Set/unset UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (S4U2Proxy) for an account.
accountname
[(on|off)] [options]Set/unset UF_TRUSTED_FOR_DELEGATION for an account.
classic_smb_conf
Upgrade from Samba classic (NT4-like) database to Samba AD DC database.
dnsdomain
[DC|RODC] [options]Promote an existing domain member or NT4 PDC to an AD DC.
dnsdomain
[DC|RODC|MEMBER|SUBDOMAIN] [options]Join a domain as either member or backup domain controller.
pso-name
user-or-group-name
[options]Applies a PSO's password policy to a user or group.
pso-name
precedence
[options]Creates a new Password Settings Object (PSO).
pso-name
[options]Displays the Password Settings that apply to a user.
pso-name
user-or-group-name
[options]Updates a PSO to no longer apply to a user or group.
Show replication status. The [--json] option results in JSON output, and with the [--summary] option produces very little output when the replication status seems healthy.
VALUE
Modify dsheuristics directory_service configuration for the forest.
groupname
new_parent_dn
[options]This command moves a group into the specified organizational unit or container.
The groupname specified on the command is the sAMAccountName.
The name of the organizational unit or container can be specified as a full DN or without the domainDN component.
URL1
URL2
domain|configuration|schema|dnsdomain|dnsforest
[options] Compare two LDAP databases.
ou_dn
[options]Create an organizational unit.
The name of the organizational unit can be specified as a full DN or without the domainDN component.
Specify OU's description.
ou_dn
[options]Delete an organizational unit.
The name of the organizational unit can be specified as a full DN or without the domainDN component.
Delete organizational unit and all children reclusively.
ou_dn
[options]List all objects in an organizational unit.
The name of the organizational unit can be specified as a full DN or without the domainDN component.
Display DNs including the base DN.
List objects recursively.
old_ou_dn
new_parent_dn
[options]Move an organizational unit.
The name of the organizational units can be specified as a full DN or without the domainDN component.
old_ou_dn
new_ou_dn
[options]Rename an organizational unit.
The name of the organizational units can be specified as a full DN or without the domainDN component.
attribute
[options]Show objectclasses that MAY or MUST contain this attribute.
username
[password
]Create a new user. Please note that this subcommand is deprecated
and available for compatibility reasons only. Please use
samba-tool user create
instead.
username
[options]Display a user AD object.
Comma separated list of attributes, which will be printed.
username
new_parent_dn
[options]This command moves a user account into the specified organizational unit or container.
The username specified on the command is the sAMAccountName.
The name of the organizational unit or container can be specified as a full DN or without the domainDN component.
--cache-ldb-initialize
[options]Syncs the passwords of all user accounts, using an optional script.
Note that this command should run on a single domain controller only (typically the PDC-emulator).
domain
Join and synchronise a remote AD domain to the local server.
Please note that samba-tool vampire
is deprecated,
please use samba-tool domain join
instead.
subcommand
Produce graphical representations of Samba network state. To work out what is happening in a replication graph, it is sometimes helpful to use visualisations.
There are two subcommands, two graphical modes, and (roughly) two modes of operation with respect to the location of authority.
Looks at NTDS connections.
Looks at repsTo and repsFrom objects.
Looks at replication lag as shown by the uptodateness vectors.
Distances between DCs are shown in a matrix in the terminal.
Generate Graphviz dot output (for ntdsconn and reps modes). When viewed using dot or xdot, this shows the network as a graph with DCs as vertices and connections edges. Certain types of degenerate edges are shown in different colours or line-styles.
Generate Graphviz dot output as with
[--dot] and attempt to view it
immediately using /usr/bin/xdot
.
Normally,
samba-tool
talks to one database;
with the [-r] option attempts
are made to contact all the DCs known to the first
database. This is necessary for samba-tool
visualize uptodateness
and for
samba-tool visualize reps
because
the repsFrom/To objects are not replicated, and it can
reveal replication issues in other modes.