1SAMBA-TOOL(8)             System Administration tools            SAMBA-TOOL(8)
2
3
4

NAME

6       samba-tool - Main Samba administration tool.
7

SYNOPSIS

9       samba-tool [-h] [-W myworkgroup] [-U user] [-d debuglevel] [--v]
10

DESCRIPTION

12       This tool is part of the samba(7) suite.
13

OPTIONS

15       -h|--help
16           Show this help message and exit
17
18       --realm=REALM
19           Set the realm name
20
21       --simple-bind-dn=DN
22           DN to use for a simple bind
23
24       --password=PASSWORD
25           Password
26
27       -U USERNAME|--username=USERNAME
28           Username
29
30       -W WORKGROUP|--workgroup=WORKGROUP
31           Workgroup
32
33       -N|--no-pass
34           Don't ask for a password
35
36       -k KERBEROS|--kerberos=KERBEROS
37           Use Kerberos
38
39       --ipaddress=IPADDRESS
40           IP address of the server
41
42       -d|--debuglevel=level
43           level is an integer from 0 to 10. The default value if this
44           parameter is not specified is 1.
45
46           The higher this value, the more detail will be logged to the log
47           files about the activities of the server. At level 0, only critical
48           errors and serious warnings will be logged. Level 1 is a reasonable
49           level for day-to-day running - it generates a small amount of
50           information about operations carried out.
51
52           Levels above 1 will generate considerable amounts of log data, and
53           should only be used when investigating a problem. Levels above 3
54           are designed for use only by developers and generate HUGE amounts
55           of log data, most of which is extremely cryptic.
56
57           Note that specifying this parameter here will override the log
58           level parameter in the smb.conf file.
59
60       -V|--version
61           Prints the program version number.
62
63       -s|--configfile=<configuration file>
64           The file specified contains the configuration details required by
65           the server. The information in this file includes server-specific
66           information such as what printcap file to use, as well as
67           descriptions of all the services that the server is to provide. See
68           smb.conf for more information. The default configuration file name
69           is determined at compile time.
70
71       -l|--log-basename=logdirectory
72           Base directory name for log/debug files. The extension ".progname"
73           will be appended (e.g. log.smbclient, log.smbd, etc...). The log
74           file is never removed by the client.
75
76       --option=<name>=<value>
77           Set the smb.conf(5) option "<name>" to value "<value>" from the
78           command line. This overrides compiled-in defaults and options read
79           from the configuration file.
80

COMMANDS

82   computer create computername [options]
83       Create a new computer in the Active Directory Domain.
84
85       The new computer name specified on the command is the sAMAccountName,
86       with or without the trailing dollar sign.
87
88       --computerou=COMPUTEROU
89           DN of alternative location (with or without domainDN counterpart)
90           to default CN=Computers in which new computer object will be
91           created. E.g. 'OU=OUname'.
92
93       --description=DESCRIPTION
94           The new computers's description.
95
96       --ip-address=IP_ADDRESS_LIST
97           IPv4 address for the computer's A record, or IPv6 address for AAAA
98           record, can be provided multiple times.
99
100       --service-principal-name=SERVICE_PRINCIPAL_NAME_LIST
101           Computer's Service Principal Name, can be provided multiple times.
102
103       --prepare-oldjoin
104           Prepare enabled machine account for oldjoin mechanism.
105
106   computer delete computername [options]
107       Delete an existing computer account.
108
109       The computer name specified on the command is the sAMAccountName, with
110       or without the trailing dollar sign.
111
112   computer list
113       List all computers.
114
115   computer move computername new_parent_dn [options]
116       This command moves a computer account into the specified organizational
117       unit or container.
118
119       The computername specified on the command is the sAMAccountName, with
120       or without the trailing dollar sign.
121
122       The name of the organizational unit or container can be specified as a
123       full DN or without the domainDN component.
124
125   computer show computername [options]
126       Display a computer AD object.
127
128       The computer name specified on the command is the sAMAccountName, with
129       or without the trailing dollar sign.
130
131       --attributes=USER_ATTRS
132           Comma separated list of attributes, which will be printed.
133
134   dbcheck
135       Check the local AD database for errors.
136
137   delegation
138       Manage Delegations.
139
140   delegation add-service accountname principal [options]
141       Add a service principal as msDS-AllowedToDelegateTo.
142
143   delegation del-service accountname principal [options]
144       Delete a service principal as msDS-AllowedToDelegateTo.
145
146   delegation for-any-protocol accountname [(on|off)] [options]
147       Set/unset UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (S4U2Proxy) for an
148       account.
149
150   delegation for-any-service accountname [(on|off)] [options]
151       Set/unset UF_TRUSTED_FOR_DELEGATION for an account.
152
153   delegation show accountname [options]
154       Show the delegation setting of an account.
155
156   dns
157       Manage Domain Name Service (DNS).
158
159   dns add server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT data
160       Add a DNS record.
161
162   dns delete server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT data
163       Delete a DNS record.
164
165   dns query server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT|ALL [options]
166       data
167       Query a name.
168
169   dns roothints server [name] [options]
170       Query root hints.
171
172   dns serverinfo server [options]
173       Query server information.
174
175   dns update server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT olddata newdata
176       Update a DNS record.
177
178   dns zonecreate server zone [options]
179       Create a zone.
180
181   dns zonedelete server zone [options]
182       Delete a zone.
183
184   dns zoneinfo server zone [options]
185       Query zone information.
186
187   dns zonelist server [options]
188       List zones.
189
190   domain
191       Manage Domain.
192
193   domain backup
194       Create or restore a backup of the domain.
195
196   domain backup online
197       Copy a running DC's current DB into a backup tar file.
198
199   domain backup rename
200       Copy a running DC's DB to backup file, renaming the domain in the
201       process.
202
203   domain backup restore
204       Restore the domain's DB from a backup-file.
205
206   domain classicupgrade [options] classic_smb_conf
207       Upgrade from Samba classic (NT4-like) database to Samba AD DC database.
208
209   domain dcpromo dnsdomain [DC|RODC] [options]
210       Promote an existing domain member or NT4 PDC to an AD DC.
211
212   domain demote
213       Demote ourselves from the role of domain controller.
214
215   domain exportkeytab keytab [options]
216       Dumps Kerberos keys of the domain into a keytab.
217
218   domain info ip_address [options]
219       Print basic info about a domain and the specified DC.
220
221   domain join dnsdomain [DC|RODC|MEMBER|SUBDOMAIN] [options]
222       Join a domain as either member or backup domain controller.
223
224   domain level show|raise options [options]
225       Show/raise domain and forest function levels.
226
227   domain passwordsettings show|set options [options]
228       Show/set password settings.
229
230   domain passwordsettings pso
231       Manage fine-grained Password Settings Objects (PSOs).
232
233   domain passwordsettings pso apply pso-name user-or-group-name [options]
234       Applies a PSO's password policy to a user or group.
235
236   domain passwordsettings pso create pso-name precedence [options]
237       Creates a new Password Settings Object (PSO).
238
239   domain passwordsettings pso delete pso-name [options]
240       Deletes a Password Settings Object (PSO).
241
242   domain passwordsettings pso list [options]
243       Lists all Password Settings Objects (PSOs).
244
245   domain passwordsettings pso set pso-name [options]
246       Modifies a Password Settings Object (PSO).
247
248   domain passwordsettings pso show user-name [options]
249       Displays a Password Settings Object (PSO).
250
251   domain passwordsettings pso show-user pso-name [options]
252       Displays the Password Settings that apply to a user.
253
254   domain passwordsettings pso unapply pso-name user-or-group-name [options]
255       Updates a PSO to no longer apply to a user or group.
256
257   domain provision
258       Promote an existing domain member or NT4 PDC to an AD DC.
259
260   domain trust
261       Domain and forest trust management.
262
263   domain trust create DOMAIN options [options]
264       Create a domain or forest trust.
265
266   domain trust delete DOMAIN options [options]
267       Delete a domain trust.
268
269   domain trust list options [options]
270       List domain trusts.
271
272   domain trust namespaces [DOMAIN] options [options]
273       Manage forest trust namespaces.
274
275   domain trust show DOMAIN options [options]
276       Show trusted domain details.
277
278   domain trust validate DOMAIN options [options]
279       Validate a domain trust.
280
281   drs
282       Manage Directory Replication Services (DRS).
283
284   drs bind
285       Show DRS capabilities of a server.
286
287   drs kcc
288       Trigger knowledge consistency center run.
289
290   drs options
291       Query or change options for NTDS Settings object of a domain
292       controller.
293
294   drs replicate destination_DC source_DC NC [options]
295       Replicate a naming context between two DCs.
296
297   drs showrepl
298       Show replication status. The [--json] option results in JSON output,
299       and with the [--summary] option produces very little output when the
300       replication status seems healthy.
301
302   dsacl
303       Administer DS ACLs
304
305   dsacl set
306       Modify access list on a directory object.
307
308   forest
309       Manage Forest configuration.
310
311   forest directory_service
312       Manage directory_service behaviour for the forest.
313
314   forest directory_service dsheuristics VALUE
315       Modify dsheuristics directory_service configuration for the forest.
316
317   forest directory_service show
318       Show current directory_service configuration for the forest.
319
320   fsmo
321       Manage Flexible Single Master Operations (FSMO).
322
323   fsmo seize [options]
324       Seize the role.
325
326   fsmo show
327       Show the roles.
328
329   fsmo transfer [options]
330       Transfer the role.
331
332   gpo
333       Manage Group Policy Objects (GPO).
334
335   gpo create displayname [options]
336       Create an empty GPO.
337
338   gpo del gpo [options]
339       Delete GPO.
340
341   gpo dellink container_dn gpo [options]
342       Delete GPO link from a container.
343
344   gpo fetch gpo [options]
345       Download a GPO.
346
347   gpo getinheritance container_dn [options]
348       Get inheritance flag for a container.
349
350   gpo getlink container_dn [options]
351       List GPO Links for a container.
352
353   gpo list username [options]
354       List GPOs for an account.
355
356   gpo listall
357       List all GPOs.
358
359   gpo listcontainers gpo [options]
360       List all linked containers for a GPO.
361
362   gpo setinheritance container_dn block|inherit [options]
363       Set inheritance flag on a container.
364
365   gpo setlink container_dn gpo [options]
366       Add or Update a GPO link to a container.
367
368   gpo show gpo [options]
369       Show information for a GPO.
370
371   group
372       Manage groups.
373
374   group add groupname [options]
375       Create a new AD group.
376
377   group addmembers groupname members [options]
378       Add members to an AD group.
379
380   group delete groupname [options]
381       Delete an AD group.
382
383   group list
384       List all groups.
385
386   group listmembers groupname [options]
387       List all members of the specified AD group.
388
389   group move groupname new_parent_dn [options]
390       This command moves a group into the specified organizational unit or
391       container.
392
393       The groupname specified on the command is the sAMAccountName.
394
395       The name of the organizational unit or container can be specified as a
396       full DN or without the domainDN component.
397
398   group removemembers groupname members [options]
399       Remove members from the specified AD group.
400
401   group show groupname [options]
402       Show group object and it's attributes.
403
404   ldapcmp URL1 URL2 domain|configuration|schema|dnsdomain|dnsforest [options]
405       Compare two LDAP databases.
406
407   ntacl
408       Manage NT ACLs.
409
410   ntacl get file [options]
411       Get ACLs on a file.
412
413   ntacl set acl file [options]
414       Set ACLs on a file.
415
416   ntacl sysvolcheck
417       Check sysvol ACLs match defaults (including correct ACLs on GPOs).
418
419   ntacl sysvolreset
420       Reset sysvol ACLs to defaults (including correct ACLs on GPOs).
421
422   ou create ou_dn [options]
423       Create an organizational unit.
424
425       The name of the organizational unit can be specified as a full DN or
426       without the domainDN component.
427
428       --description=DESCRIPTION
429           Specify OU's description.
430
431   ou delete ou_dn [options]
432       Delete an organizational unit.
433
434       The name of the organizational unit can be specified as a full DN or
435       without the domainDN component.
436
437       --force-subtree-delete
438           Delete organizational unit and all children reclusively.
439
440   ou list [options]
441       List all organizational units.
442
443       --full-dn
444           Display DNs including the base DN.
445
446   ou listobjects ou_dn [options]
447       List all objects in an organizational unit.
448
449       The name of the organizational unit can be specified as a full DN or
450       without the domainDN component.
451
452       --full-dn
453           Display DNs including the base DN.
454
455       -r|--recursive
456           List objects recursively.
457
458   ou move old_ou_dn new_parent_dn [options]
459       Move an organizational unit.
460
461       The name of the organizational units can be specified as a full DN or
462       without the domainDN component.
463
464   ou rename old_ou_dn new_ou_dn [options]
465       Rename an organizational unit.
466
467       The name of the organizational units can be specified as a full DN or
468       without the domainDN component.
469
470   rodc
471       Manage Read-Only Domain Controller (RODC).
472
473   rodc preload SID|DN|accountname [options]
474       Preload one account for an RODC.
475
476   schema
477       Manage and query schema.
478
479   schema attribute modify attribute [options]
480       Modify the behaviour of an attribute in schema.
481
482   schema attribute show attribute [options]
483       Display an attribute schema definition.
484
485   schema attribute show_oc attribute [options]
486       Show objectclasses that MAY or MUST contain this attribute.
487
488   schema objectclass show objectclass [options]
489       Display an objectclass schema definition.
490
491   sites
492       Manage sites.
493
494   sites create site [options]
495       Create a new site.
496
497   sites remove site [options]
498       Delete an existing site.
499
500   spn
501       Manage Service Principal Names (SPN).
502
503   spn add name user [options]
504       Create a new SPN.
505
506   spn delete name [user] [options]
507       Delete an existing SPN.
508
509   spn list user [options]
510       List SPNs of a given user.
511
512   testparm
513       Check the syntax of the configuration file.
514
515   time
516       Retrieve the time on a server.
517
518   user
519       Manage users.
520
521   user add username [password]
522       Create a new user. Please note that this subcommand is deprecated and
523       available for compatibility reasons only. Please use samba-tool user
524       create instead.
525
526   user create username [password]
527       Create a new user in the Active Directory Domain.
528
529   user delete username [options]
530       Delete an existing user account.
531
532   user disable username
533       Disable an user account.
534
535   user enable username
536       Enable an user account.
537
538   user list
539       List all users.
540
541   user show username [options]
542       Display a user AD object.
543
544       --attributes=USER_ATTRS
545           Comma separated list of attributes, which will be printed.
546
547   user move username new_parent_dn [options]
548       This command moves a user account into the specified organizational
549       unit or container.
550
551       The username specified on the command is the sAMAccountName.
552
553       The name of the organizational unit or container can be specified as a
554       full DN or without the domainDN component.
555
556   user password [options]
557       Change password for an user account (the one provided in
558       authentication).
559
560   user setexpiry username [options]
561       Set the expiration of an user account.
562
563   user setpassword username [options]
564       Sets or resets the password of an user account.
565
566   user getpassword username [options]
567       Gets the password of an user account.
568
569   user syncpasswords --cache-ldb-initialize [options]
570       Syncs the passwords of all user accounts, using an optional script.
571
572       Note that this command should run on a single domain controller only
573       (typically the PDC-emulator).
574
575   vampire [options] domain
576       Join and synchronise a remote AD domain to the local server. Please
577       note that samba-tool vampire is deprecated, please use samba-tool
578       domain join instead.
579
580   visualize [options] subcommand
581       Produce graphical representations of Samba network state. To work out
582       what is happening in a replication graph, it is sometimes helpful to
583       use visualisations.
584
585       There are two subcommands, two graphical modes, and (roughly) two modes
586       of operation with respect to the location of authority.
587
588   MODES OF OPERATION
589       samba-tool visualize ntdsconn
590           Looks at NTDS connections.
591
592       samba-tool visualize reps
593           Looks at repsTo and repsFrom objects.
594
595       samba-tool visualize uptodateness
596           Looks at replication lag as shown by the uptodateness vectors.
597
598   GRAPHICAL MODES
599       --distance
600           Distances between DCs are shown in a matrix in the terminal.
601
602       --dot
603           Generate Graphviz dot output (for ntdsconn and reps modes). When
604           viewed using dot or xdot, this shows the network as a graph with
605           DCs as vertices and connections edges. Certain types of degenerate
606           edges are shown in different colours or line-styles.
607
608       --xdot
609           Generate Graphviz dot output as with [--dot] and attempt to view it
610           immediately using /usr/bin/xdot.
611
612       -r
613           Normally, samba-tool talks to one database; with the [-r] option
614           attempts are made to contact all the DCs known to the first
615           database. This is necessary for samba-tool visualize uptodateness
616           and for samba-tool visualize reps because the repsFrom/To objects
617           are not replicated, and it can reveal replication issues in other
618           modes.
619
620   help
621       Gives usage information.
622

VERSION

624       This man page is complete for version 4.9.8 of the Samba suite.
625

AUTHOR

627       The original Samba software and related utilities were created by
628       Andrew Tridgell. Samba is now developed by the Samba Team as an Open
629       Source project similar to the way the Linux kernel is developed.
630
631
632
633Samba 4.9.8                       05/14/2019                     SAMBA-TOOL(8)
Impressum