summaryrefslogtreecommitdiffstats
path: root/upstream/archlinux/man8/samba-tool.8
blob: 45577459dae47ae4275e3f1bd22a39b75f6d40bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
'\" t
.\"     Title: samba-tool
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 05/09/2024
.\"    Manual: System Administration tools
.\"    Source: Samba 4.20.1
.\"  Language: English
.\"
.TH "SAMBA\-TOOL" "8" "05/09/2024" "Samba 4\&.20\&.1" "System Administration tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
samba-tool \- Main Samba administration tool\&.
.SH "SYNOPSIS"
.HP \w'\ 'u
samba\-tool [\-h] [\-W\ myworkgroup] [\-U\ user] [\-d\ debuglevel] [\-\-v]
.SH "DESCRIPTION"
.PP
This tool is part of the
\fBsamba\fR(7)
suite\&.
.SH "OPTIONS"
.PP
\-h|\-\-help
.RS 4
Show this help message and exit
.RE
.PP
\-r|\-\-realm=REALM
.RS 4
Set the realm for the domain\&.
.sp
Note that specifying this parameter here will override the
\m[blue]\fBrealm\fR\m[]
parameter in the
/etc/samba/smb\&.conf
file\&.
.RE
.PP
\-\-simple\-bind\-dn=DN
.RS 4
DN to use for a simple bind\&.
.RE
.PP
\-\-password
.RS 4
Specify the password on the commandline\&.
.sp
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\&.
.sp
If \-\-password is not specified, the tool will check the
\fBPASSWD\fR
environment variable, followed by
\fBPASSWD_FD\fR
which is expected to contain an open file descriptor (FD) number\&.
.sp
Finally it will check
\fBPASSWD_FILE\fR
(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!
.sp
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\&.
.RE
.PP
\-U|\-\-user=[DOMAIN\e]USERNAME[%PASSWORD]
.RS 4
Sets the SMB username or username and password\&.
.sp
If %PASSWORD is not specified, the user will be prompted\&. The client will first check the
\fBUSER\fR
environment variable (which is also permitted to also contain the password separated by a %), then the
\fBLOGNAME\fR
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\&.
.sp
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
\fI\-A\fR
for more details\&.
.sp
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\&.
.sp
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\&.
.RE
.PP
\-W|\-\-workgroup=WORKGROUP
.RS 4
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)\&.
.sp
Note that specifying this parameter here will override the
\m[blue]\fBworkgroup\fR\m[]
parameter in the
/etc/samba/smb\&.conf
file\&.
.RE
.PP
\-N|\-\-no\-pass
.RS 4
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\&.
.sp
Unless a password is specified on the command line or this parameter is specified, the client will request a password\&.
.sp
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\&.
.RE
.PP
\-\-use\-kerberos=desired|required|off
.RS 4
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\&.
.sp
Note that specifying this parameter here will override the
\m[blue]\fBclient use kerberos\fR\m[]
parameter in the
/etc/samba/smb\&.conf
file\&.
.RE
.PP
\-\-use\-krb5\-ccache=CCACHE
.RS 4
Specifies the credential cache location for Kerberos authentication\&.
.sp
This will set \-\-use\-kerberos=required too\&.
.RE
.PP
\-A|\-\-authentication\-file=filename
.RS 4
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:
.sp
.if n \{\
.RS 4
.\}
.nf
				username = <value>
				password = <value>
				domain   = <value>
			
.fi
.if n \{\
.RE
.\}
.sp
Make certain that the permissions on the file restrict access from unwanted users!
.RE
.PP
\-\-ipaddress=IPADDRESS
.RS 4
IP address of the server
.RE
.PP
\-\-color=always|never|auto
.RS 4
Indicate whether samba\-tool should use ANSI colour codes in its output\&. If \*(Aqauto\*(Aq (the default), samba\-tool will use colour when its output is directed toward a terminal, unless the NO_COLOR environment variable is set and non\-empty\&.
.sp
The values \*(Aqyes\*(Aq and \*(Aqforce\*(Aq are accepted as synonyms for \*(Aqalways\*(Aq; \*(Aqno\*(Aq and \*(Aqnone\*(Aq for \*(Aqnever\*(Aq; and \*(Aqtty\*(Aq and \*(Aqif\-tty\*(Aq for \*(Aqauto\*(Aq\&.
.sp
Note that asking for colour doesn\*(Aqt mean samba\-tool will necessarily be very colourful\&. Many commands are very monochrome, particularly when successful\&.
.RE
.PP
\-d|\-\-debuglevel=DEBUGLEVEL
.RS 4
\fIlevel\fR
is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
.sp
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\&.
.sp
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\&.
.sp
Note that specifying this parameter here will override the
\m[blue]\fBlog level\fR\m[]
parameter in the
/etc/samba/smb\&.conf
file\&.
.RE
.PP
\-\-debug\-stdout
.RS 4
This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
.RE
.SH "COMMANDS"
.SS "computer"
.PP
Manage computer accounts\&.
.SS "computer add computername [options]"
.PP
Add a new computer to the Active Directory Domain\&.
.PP
The new computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign\&.
.PP
\-\-computerou=COMPUTEROU
.RS 4
DN of alternative location (with or without domainDN counterpart) to default CN=Computers in which new computer object will be created\&. E\&.g\&. \*(AqOU=OUname\*(Aq\&.
.RE
.PP
\-\-description=DESCRIPTION
.RS 4
The new computer\*(Aqs description\&.
.RE
.PP
\-\-ip\-address=IP_ADDRESS_LIST
.RS 4
IPv4 address for the computer\*(Aqs A record, or IPv6 address for AAAA record, can be provided multiple times\&.
.RE
.PP
\-\-service\-principal\-name=SERVICE_PRINCIPAL_NAME_LIST
.RS 4
Computer\*(Aqs Service Principal Name, can be provided multiple times\&.
.RE
.PP
\-\-prepare\-oldjoin
.RS 4
Prepare enabled machine account for oldjoin mechanism\&.
.RE
.SS "computer create computername [options]"
.PP
Add a new computer\&. This is a synonym for the
samba\-tool computer add
command and is available for compatibility reasons only\&. Please use
samba\-tool computer add
instead\&.
.SS "computer delete computername [options]"
.PP
Delete an existing computer account\&.
.PP
The computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign\&.
.SS "computer edit computername"
.PP
Edit a computer AD object\&.
.PP
The computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign\&.
.PP
\-\-editor=EDITOR
.RS 4
Specifies the editor to use instead of the system default, or \*(Aqvi\*(Aq if no system default is set\&.
.RE
.SS "computer list"
.PP
List all computers\&.
.SS "computer move computername new_parent_dn [options]"
.PP
This command moves a computer account into the specified organizational unit or container\&.
.PP
The computername specified on the command is the sAMAccountName, with or without the trailing dollar sign\&.
.PP
The name of the organizational unit or container can be specified as a full DN or without the domainDN component\&.
.SS "computer show computername [options]"
.PP
Display a computer AD object\&.
.PP
The computer name specified on the command is the sAMAccountName, with or without the trailing dollar sign\&.
.PP
\-\-attributes=USER_ATTRS
.RS 4
Comma separated list of attributes, which will be printed\&.
.RE
.SS "contact"
.PP
Manage contacts\&.
.SS "contact add [contactname] [options]"
.PP
Add a new contact to the Active Directory Domain\&.
.PP
The name of the new contact can be specified by the first argument \*(Aqcontactname\*(Aq or the \-\-given\-name, \-\-initial and \-\-surname arguments\&. If no \*(Aqcontactname\*(Aq is given, contact\*(Aqs name will be made up of the given arguments by combining the given\-name, initials and surname\&. Each argument is optional\&. A dot (\*(Aq\&.\*(Aq) will be appended to the initials automatically\&.
.PP
\-\-ou=OU
.RS 4
DN of alternative location (with or without domainDN counterpart) in which the new contact will be created\&. E\&.g\&. \*(AqOU=OUname\*(Aq\&. Default is the domain base\&.
.RE
.PP
\-\-description=DESCRIPTION
.RS 4
The new contact\*(Aqs description\&.
.RE
.PP
\-\-surname=SURNAME
.RS 4
Contact\*(Aqs surname\&.
.RE
.PP
\-\-given\-name=GIVEN_NAME
.RS 4
Contact\*(Aqs given name\&.
.RE
.PP
\-\-initials=INITIALS
.RS 4
Contact\*(Aqs initials\&.
.RE
.PP
\-\-display\-name=DISPLAY_NAME
.RS 4
Contact\*(Aqs display name\&.
.RE
.PP
\-\-job\-title=JOB_TITLE
.RS 4
Contact\*(Aqs job title\&.
.RE
.PP
\-\-department=DEPARTMENT
.RS 4
Contact\*(Aqs department\&.
.RE
.PP
\-\-company=COMPANY
.RS 4
Contact\*(Aqs company\&.
.RE
.PP
\-\-mail\-address=MAIL_ADDRESS
.RS 4
Contact\*(Aqs email address\&.
.RE
.PP
\-\-internet\-address=INTERNET_ADDRESS
.RS 4
Contact\*(Aqs home page\&.
.RE
.PP
\-\-telephone\-number=TELEPHONE_NUMBER
.RS 4
Contact\*(Aqs phone number\&.
.RE
.PP
\-\-mobile\-number=MOBILE_NUMBER
.RS 4
Contact\*(Aqs mobile phone number\&.
.RE
.PP
\-\-physical\-delivery\-office=PHYSICAL_DELIVERY_OFFICE
.RS 4
Contact\*(Aqs office location\&.
.RE
.SS "contact create [contactname] [options]"
.PP
Add a new contact\&. This is a synonym for the
samba\-tool contact add
command and is available for compatibility reasons only\&. Please use
samba\-tool contact add
instead\&.
.SS "contact delete contactname [options]"
.PP
Delete an existing contact\&.
.PP
The contactname specified on the command is the common name or the distinguished name of the contact object\&. The distinguished name of the contact can be specified with or without the domainDN component\&.
.SS "contact edit contactname"
.PP
Modify a contact AD object\&.
.PP
The contactname specified on the command is the common name or the distinguished name of the contact object\&. The distinguished name of the contact can be specified with or without the domainDN component\&.
.PP
\-\-editor=EDITOR
.RS 4
Specifies the editor to use instead of the system default, or \*(Aqvi\*(Aq if no system default is set\&.
.RE
.SS "contact list [options]"
.PP
List all contacts\&.
.PP
\-\-full\-dn
.RS 4
Display contact\*(Aqs full DN instead of the name\&.
.RE
.SS "contact move contactname new_parent_dn [options]"
.PP
This command moves a contact into the specified organizational unit or container\&.
.PP
The contactname specified on the command is the common name or the distinguished name of the contact object\&. The distinguished name of the contact can be specified with or without the domainDN component\&.
.SS "contact show contactname [options]"
.PP
Display a contact AD object\&.
.PP
The contactname specified on the command is the common name or the distinguished name of the contact object\&. The distinguished name of the contact can be specified with or without the domainDN component\&.
.PP
\-\-attributes=CONTACT_ATTRS
.RS 4
Comma separated list of attributes, which will be printed\&.
.RE
.SS "contact rename contactname [options]"
.PP
Rename a contact and related attributes\&.
.PP
This command allows to set the contact\*(Aqs name related attributes\&. The contact\*(Aqs CN will be renamed automatically\&. The contact\*(Aqs new CN will be made up by combining the given\-name, initials and surname\&. A dot (\*(Aq\&.\*(Aq) will be appended to the initials automatically, if required\&. Use the \-\-force\-new\-cn option to specify the new CN manually and \-\-reset\-cn to reset this change\&.
.PP
Use an empty attribute value to remove the specified attribute\&.
.PP
The contact name specified on the command is the CN\&.
.PP
\-\-surname=SURNAME
.RS 4
New surname\&.
.RE
.PP
\-\-given\-name=GIVEN_NAME
.RS 4
New given name\&.
.RE
.PP
\-\-initials=INITIALS
.RS 4
New initials\&.
.RE
.PP
\-\-force\-new\-cn=NEW_CN
.RS 4
Specify a new CN (RDN) instead of using a combination of the given name, initials and surname\&.
.RE
.PP
\-\-reset\-cn
.RS 4
Set the CN to the default combination of given name, initials and surname\&.
.RE
.PP
\-\-display\-name=DISPLAY_NAME
.RS 4
New display name\&.
.RE
.PP
\-\-mail\-address=MAIL_ADDRESS
.RS 4
New email address\&.
.RE
.SS "dbcheck"
.PP
Check the local AD database for errors\&.
.SS "delegation"
.PP
Manage Delegations\&.
.SS "delegation add-service accountname principal [options]"
.PP
Add a service principal as msDS\-AllowedToDelegateTo\&.
.SS "delegation del-service accountname principal [options]"
.PP
Delete a service principal as msDS\-AllowedToDelegateTo\&.
.SS "delegation for-any-protocol accountname [(on|off)] [options]"
.PP
Set/unset UF_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION (S4U2Proxy) for an account\&.
.SS "delegation for-any-service accountname [(on|off)] [options]"
.PP
Set/unset UF_TRUSTED_FOR_DELEGATION for an account\&.
.SS "delegation show accountname [options]	"
.PP
Show the delegation setting of an account\&.
.SS "dns"
.PP
Manage Domain Name Service (DNS)\&.
.SS "dns add server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT data"
.PP
Add a DNS record\&.
.SS "dns delete server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT data"
.PP
Delete a DNS record\&.
.SS "dns query server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT|ALL [options] data"
.PP
Query a name\&.
.SS "dns roothints server [name] [options]"
.PP
Query root hints\&.
.SS "dns serverinfo server [options]"
.PP
Query server information\&.
.SS "dns update server zone name A|AAAA|PTR|CNAME|NS|MX|SRV|TXT olddata newdata"
.PP
Update a DNS record\&.
.SS "dns zonecreate server zone [options]"
.PP
Create a zone\&.
.SS "dns zonedelete server zone [options]"
.PP
Delete a zone\&.
.SS "dns zoneinfo server zone [options]"
.PP
Query zone information\&.
.SS "dns zonelist server [options]"
.PP
List zones\&.
.SS "domain"
.PP
Manage Domain\&.
.SS "domain backup"
.PP
Create or restore a backup of the domain\&.
.SS "domain backup offline"
.PP
Backup (with proper locking) local domain directories into a tar file\&.
.SS "domain backup online"
.PP
Copy a running DC\*(Aqs current DB into a backup tar file\&.
.SS "domain backup rename"
.PP
Copy a running DC\*(Aqs DB to backup file, renaming the domain in the process\&.
.SS "domain backup restore"
.PP
Restore the domain\*(Aqs DB from a backup\-file\&.
.SS "domain auth policy list"
.PP
List authentication policies on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-json
.RS 4
View authentication policies as JSON instead of a list\&.
.RE
.SS "domain auth policy view"
.PP
View an authentication policy on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of the authentication policy to view (required)\&.
.RE
.SS "domain auth policy create"
.PP
Create authentication policies on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of the authentication policy (required)\&.
.RE
.PP
\-\-description
.RS 4
Optional description for the authentication policy\&.
.RE
.PP
\-\-protect
.RS 4
Protect authentication policy from accidental deletion\&.
.sp
Cannot be used together with \-\-unprotect\&.
.RE
.PP
\-\-unprotect
.RS 4
Unprotect authentication policy from accidental deletion\&.
.sp
Cannot be used together with \-\-protect\&.
.RE
.PP
\-\-audit
.RS 4
Only audit authentication policy\&.
.sp
Cannot be used together with \-\-enforce\&.
.RE
.PP
\-\-enforce
.RS 4
Enforce authentication policy\&.
.sp
Cannot be used together with \-\-audit\&.
.RE
.PP
\-\-strong\-ntlm\-policy
.RS 4
Strong NTLM Policy (Disabled, Optional, Required)\&.
.RE
.PP
\-\-user\-tgt\-lifetime\-mins
.RS 4
Ticket\-Granting\-Ticket lifetime for user accounts\&.
.RE
.PP
\-\-user\-allow\-ntlm\-auth
.RS 4
Allow
\fBNTLM\fR
and
\fB Interactive NETLOGON SamLogon\fR
authentication despite the fact that
\fBallowed\-to\-authenticate\-from\fR
is in use, which would otherwise restrict the user to selected devices\&.
.RE
.PP
\-\-user\-allowed\-to\-authenticate\-from
.RS 4
Conditions a device must meet for users covered by this policy to be allowed to authenticate\&. While this is a restriction on the device, any conditional ACE rules are expressed as if the device was a user\&.
.sp
Must be a valid SDDL string without reference to Device keywords\&.
.sp
Example: O:SYG:SYD:(XA;OICI;CR;;;WD;(Member_of {SID(AU)}))
.RE
.PP
\-\-user\-allowed\-to\-authenticate\-from\-silo
.RS 4
User is allowed to authenticate, if the device they authenticate from is assigned and granted membership of a given silo\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-user\-allowed\-to\-authenticate\-from
.RE
.PP
\-\-user\-allowed\-to\-authenticate\-to=SDDL
.RS 4
This policy, applying to a user account that is offering a service, eg a web server with a user account, restricts which accounts may access it\&.
.sp
Must be a valid SDDL string\&. The SDDL can reference both bare (user) and Device conditions\&.
.sp
SDDL Example:
\fBO:SYG:SYD:(XA;OICI;CR;;;WD;(Member_of {SID(AO)}))\fR
.RE
.PP
\-\-user\-allowed\-to\-authenticate\-to\-by\-group=GROUP
.RS 4
The user account, offering a network service, covered by this policy, will only be allowed access from other accounts that are members of the given
\fBGROUP\fR\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-user\-allowed\-to\-authenticate\-to
.RE
.PP
\-\-user\-allowed\-to\-authenticate\-to\-by\-silo=SILO
.RS 4
The user account, offering a network service, covered by this policy, will only be allowed access from other accounts that are assigned to, granted membership of (and meet any authentication conditions of) the given SILO\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-user\-allowed\-to\-authenticate\-to
.RE
.PP
\-\-service\-tgt\-lifetime\-mins
.RS 4
Ticket\-Granting\-Ticket lifetime for service accounts\&.
.RE
.PP
\-\-service\-allow\-ntlm\-auth
.RS 4
Allow NTLM network authentication when service is restricted to selected devices\&.
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-from
.RS 4
Conditions a device must meet for service accounts covered by this policy to be allowed to authenticate\&. While this is a restriction on the device, any conditional ACE rules are expressed as if the device was a user\&.
.sp
Must be a valid SDDL string without reference to Device keywords\&.
.sp
SDDL Example:
\fBO:SYG:SYD:(XA;OICI;CR;;;WD;(Member_of {SID(AU)}))\fR
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-from\-device\-silo=SILO
.RS 4
The service account (eg a Managed Service Account, Group Managed Service Account) is allowed to authenticate, if the device it authenticates from is assigned and granted membership of a given
\fBSILO\fR\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-service\-allowed\-to\-authenticate\-from
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-from\-device\-group=GROUP
.RS 4
The service account (eg a Managed Service Account, Group Managed Service Account) is allowed to authenticate, if the device it authenticates from is a member of the given
\fBgroup\fR\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-service\-allowed\-to\-authenticate\-from
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-to=SDDL
.RS 4
This policy, applying to a service account (eg a Managed Service Account, Group Managed Service Account), restricts which accounts may access it\&.
.sp
Must be a valid SDDL string\&. The SDDL can reference both bare (user) and Device conditions\&.
.sp
SDDL Example:
\fBO:SYG:SYD:(XA;OICI;CR;;;WD;(Member_of {SID(AO)}))\fR
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-to\-by\-group=GROUP
.RS 4
The service account (eg a Managed Service Account, Group Managed Service Account), will only be allowed access by other accounts that are members of the given
\fBGROUP\fR\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-service\-allowed\-to\-authenticate\-to
.RE
.PP
\-\-service\-allowed\-to\-authenticate\-to\-by\-silo=SILO
.RS 4
The service account (eg a Managed Service Account, Group Managed Service Account), will only be allowed access by other accounts that are assigned to, granted membership of (and meet any authentication conditions of) the given SILO\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-service\-allowed\-to\-authenticate\-to
.RE
.PP
\-\-computer\-tgt\-lifetime\-mins
.RS 4
Ticket\-Granting\-Ticket lifetime for computer accounts\&.
.RE
.PP
\-\-computer\-allowed\-to\-authenticate\-to=SDDL
.RS 4
This policy, applying to a computer account (eg a server or workstation), restricts which accounts may access it\&.
.sp
Must be a valid SDDL string\&. The SDDL can reference both bare (user) and Device conditions\&.
.sp
SDDL Example: O:SYG:SYD:(XA;OICI;CR;;;WD;(Member_of {SID(AO)}))
.RE
.PP
\-\-computer\-allowed\-to\-authenticate\-to\-by\-group=GROUP
.RS 4
The computer account (eg a server or workstation), will only be allowed access by other accounts that are members of the given
\fBGROUP\fR\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-computer\-allowed\-to\-authenticate\-to
.RE
.PP
\-\-computer\-allowed\-to\-authenticate\-to\-by\-silo=SILO
.RS 4
The computer account (eg a server or workstation), will only be allowed access by other accounts that are assigned to, granted membership of (and meet any authentication conditions of) the given SILO\&.
.sp
This attribute avoids the need to write SDDL by hand and cannot be used with \-\-computer\-allowed\-to\-authenticate\-to
.RE
.SS "domain auth policy modify"
.PP
Modify authentication policies on the domain\&. The same options apply as for
\fBdomain auth policy create\fR\&.
.SS "domain auth policy delete"
.PP
Delete authentication policies on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of authentication policy to delete (required)\&.
.RE
.PP
\-\-force
.RS 4
Force authentication policy delete even if it is protected\&.
.RE
.SS "domain auth silo list"
.PP
List authentication silos on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-json
.RS 4
View authentication silos as JSON instead of a list\&.
.RE
.SS "domain auth silo view"
.PP
View an authentication silo on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of the authentication silo to view (required)\&.
.RE
.SS "domain auth silo create"
.PP
Create authentication silos on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of the authentication silo (required)\&.
.RE
.PP
\-\-description
.RS 4
Optional description for the authentication silo\&.
.RE
.PP
\-\-user\-authentication\-policy
.RS 4
User account authentication policy\&.
.RE
.PP
\-\-service\-authentication\-policy
.RS 4
Managed service account authentication policy\&.
.RE
.PP
\-\-computer\-authentication\-policy
.RS 4
Computer authentication policy\&.
.RE
.PP
\-\-protect
.RS 4
Protect authentication silo from accidental deletion\&.
.sp
Cannot be used together with \-\-unprotect\&.
.RE
.PP
\-\-unprotect
.RS 4
Unprotect authentication silo from accidental deletion\&.
.sp
Cannot be used together with \-\-protect\&.
.RE
.PP
\-\-audit
.RS 4
Only audit silo policies\&.
.sp
Cannot be used together with \-\-enforce\&.
.RE
.PP
\-\-enforce
.RS 4
Enforce silo policies\&.
.sp
Cannot be used together with \-\-audit\&.
.RE
.SS "domain auth silo modify"
.PP
Modify authentication silos on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of the authentication silo (required)\&.
.RE
.PP
\-\-description
.RS 4
Optional description for the authentication silo\&.
.RE
.PP
\-\-user\-authentication\-policy
.RS 4
User account authentication policy\&.
.RE
.PP
\-\-service\-authentication\-policy
.RS 4
Managed service account authentication policy\&.
.RE
.PP
\-\-computer\-authentication\-policy
.RS 4
Computer authentication policy\&.
.RE
.PP
\-\-protect
.RS 4
Protect authentication silo from accidental deletion\&.
.sp
Cannot be used together with \-\-unprotect\&.
.RE
.PP
\-\-unprotect
.RS 4
Unprotect authentication silo from accidental deletion\&.
.sp
Cannot be used together with \-\-protect\&.
.RE
.PP
\-\-audit
.RS 4
Only audit silo policies\&.
.sp
Cannot be used together with \-\-enforce\&.
.RE
.PP
\-\-enforce
.RS 4
Enforce silo policies\&.
.sp
Cannot be used together with \-\-audit\&.
.RE
.SS "domain auth silo delete"
.PP
Delete authentication silos on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of authentication silo to delete (required)\&.
.RE
.PP
\-\-force
.RS 4
Force authentication silo delete even if it is protected\&.
.RE
.SS "domain auth silo member grant"
.PP
Grant a member access to an authentication silo\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of authentication silo (required)\&.
.RE
.PP
\-\-member
.RS 4
Member to grant access to the silo (DN or account name)\&.
.RE
.SS "domain auth silo member list"
.PP
List members in an authentication silo\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of authentication silo (required)\&.
.RE
.PP
\-\-json
.RS 4
View members as JSON instead of a list\&.
.RE
.SS "domain auth silo member revoke"
.PP
Revoke a member from an authentication silo\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Name of authentication silo (required)\&.
.RE
.PP
\-\-member
.RS 4
Member to revoke from the silo (DN or account name)\&.
.RE
.SS "domain claim claim-type list"
.PP
List claim types on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-json
.RS 4
View claim types as JSON instead of a list\&.
.RE
.SS "domain claim claim-type view"
.PP
View a single claim type on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Display name of claim type to view (required)\&.
.RE
.SS "domain claim claim-type create"
.PP
Create claim types on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-attribute
.RS 4
Attribute of claim type to create (required)\&.
.RE
.PP
\-\-class
.RS 4
Object classes to set claim type to\&.
.sp
Example: \-\-class=user \-\-class=computer
.RE
.PP
\-\-name
.RS 4
Optional display name or use attribute name\&.
.RE
.PP
\-\-description
.RS 4
Optional description or use from attribute\&.
.RE
.PP
\-\-enable
.RS 4
Enable claim type\&.
.sp
Cannot be used together with \-\-disable\&.
.RE
.PP
\-\-disable
.RS 4
Disable claim type\&.
.sp
Cannot be used together with \-\-enable\&.
.RE
.PP
\-\-protect
.RS 4
Protect claim type from accidental deletion\&.
.sp
Cannot be used together with \-\-unprotect\&.
.RE
.PP
\-\-unprotect
.RS 4
Unprotect claim type from accidental deletion\&.
.sp
Cannot be used together with \-\-protect\&.
.RE
.SS "domain claim claim-type modify"
.PP
Modify claim types on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Display name of claim type to modify (required)\&.
.RE
.PP
\-\-class
.RS 4
Object classes to set claim type to\&.
.sp
Example: \-\-class=user \-\-class=computer
.RE
.PP
\-\-description
.RS 4
Set the claim type description\&.
.RE
.PP
\-\-enable
.RS 4
Enable claim type\&.
.sp
Cannot be used together with \-\-disable\&.
.RE
.PP
\-\-disable
.RS 4
Disable claim type\&.
.sp
Cannot be used together with \-\-enable\&.
.RE
.PP
\-\-protect
.RS 4
Protect claim type from accidental deletion\&.
.sp
Cannot be used together with \-\-unprotect\&.
.RE
.PP
\-\-unprotect
.RS 4
Unprotect claim type from accidental deletion\&.
.sp
Cannot be used together with \-\-protect\&.
.RE
.SS "domain claim claim-type delete"
.PP
Delete claim types on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Display name of claim type to delete (required)\&.
.RE
.PP
\-\-force
.RS 4
Force claim type delete even if it is protected\&.
.RE
.SS "domain claim value-type list"
.PP
List claim value types on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-json
.RS 4
View claim value types as JSON instead of a list\&.
.RE
.SS "domain claim value-type view"
.PP
View a single claim value type on the domain\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.PP
\-\-name
.RS 4
Display name of claim value type to view (required)\&.
.RE
.SS "domain classicupgrade [options] classic_smb_conf"
.PP
Upgrade from Samba classic (NT4\-like) database to Samba AD DC database\&.
.SS "domain dcpromo dnsdomain [DC|RODC] [options]"
.PP
Promote an existing domain member or NT4 PDC to an AD DC\&.
.SS "domain demote"
.PP
Demote ourselves from the role of domain controller\&.
.SS "domain exportkeytab keytab [options]"
.PP
Dumps Kerberos keys of the domain into a keytab\&.
.SS "domain info ip_address [options]"
.PP
Print basic info about a domain and the specified DC\&.
.SS "domain join dnsdomain [DC|RODC|MEMBER|SUBDOMAIN] [options]"
.PP
Join a domain as either member or backup domain controller\&.
.SS "domain level show|raise options [options]"
.PP
Show/raise domain and forest function levels\&.
.SS "domain passwordsettings show|set options [options]"
.PP
Show/set password settings\&.
.SS "domain passwordsettings pso"
.PP
Manage fine\-grained Password Settings Objects (PSOs)\&.
.SS "domain passwordsettings pso apply pso-name user-or-group-name [options]"
.PP
Applies a PSO\*(Aqs password policy to a user or group\&.
.SS "domain passwordsettings pso create pso-name precedence [options]"
.PP
Creates a new Password Settings Object (PSO)\&.
.SS "domain passwordsettings pso delete pso-name [options]"
.PP
Deletes a Password Settings Object (PSO)\&.
.SS "domain passwordsettings pso list [options]"
.PP
Lists all Password Settings Objects (PSOs)\&.
.SS "domain passwordsettings pso set pso-name [options]"
.PP
Modifies a Password Settings Object (PSO)\&.
.SS "domain passwordsettings pso show user-name [options]"
.PP
Displays a Password Settings Object (PSO)\&.
.SS "domain passwordsettings pso show-user pso-name [options]"
.PP
Displays the Password Settings that apply to a user\&.
.SS "domain passwordsettings pso unapply pso-name user-or-group-name [options]"
.PP
Updates a PSO to no longer apply to a user or group\&.
.SS "domain provision"
.PP
Promote an existing domain member or NT4 PDC to an AD DC\&.
.SS "domain trust"
.PP
Domain and forest trust management\&.
.SS "domain trust create DOMAIN options [options]"
.PP
Create a domain or forest trust\&.
.SS "domain trust modify DOMAIN options [options]"
.PP
Modify a domain or forest trust\&.
.SS "domain trust delete DOMAIN options [options]"
.PP
Delete a domain trust\&.
.SS "domain trust list options [options]"
.PP
List domain trusts\&.
.SS "domain trust namespaces [DOMAIN] options [options]"
.PP
Manage forest trust namespaces\&.
.SS "domain trust show DOMAIN options [options]"
.PP
Show trusted domain details\&.
.SS "domain trust validate DOMAIN options [options]"
.PP
Validate a domain trust\&.
.SS "drs"
.PP
Manage Directory Replication Services (DRS)\&.
.SS "drs bind"
.PP
Show DRS capabilities of a server\&.
.SS "drs kcc"
.PP
Trigger knowledge consistency center run\&.
.SS "drs options"
.PP
Query or change
\fIoptions\fR
for NTDS Settings object of a domain controller\&.
.SS "drs replicate destination_DC source_DC NC [options]"
.PP
Replicate a naming context between two DCs\&.
.SS "drs showrepl"
.PP
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\&.
.SS "dsacl"
.PP
Administer DS ACLs
.SS "dsacl delete"
.PP
Delete an access list entry on a directory object\&.
.SS "dsacl get"
.PP
Print access list on a directory object\&.
.SS "dsacl set"
.PP
Modify access list on a directory object\&.
.SS "forest"
.PP
Manage Forest configuration\&.
.SS "forest directory_service"
.PP
Manage directory_service behaviour for the forest\&.
.SS "forest directory_service dsheuristics VALUE"
.PP
Modify dsheuristics directory_service configuration for the forest\&.
.SS "forest directory_service show"
.PP
Show current directory_service configuration for the forest\&.
.SS "fsmo"
.PP
Manage Flexible Single Master Operations (FSMO)\&.
.SS "fsmo seize [options]"
.PP
Seize the role\&.
.SS "fsmo show"
.PP
Show the roles\&.
.SS "fsmo transfer [options]"
.PP
Transfer the role\&.
.SS "gpo"
.PP
Manage Group Policy Objects (GPO)\&.
.SS "gpo create displayname [options]"
.PP
Create an empty GPO\&.
.SS "gpo del gpo [options]"
.PP
Delete GPO\&.
.SS "gpo dellink container_dn gpo [options]"
.PP
Delete GPO link from a container\&.
.SS "gpo fetch gpo [options]"
.PP
Download a GPO\&.
.SS "gpo getinheritance container_dn [options]"
.PP
Get inheritance flag for a container\&.
.SS "gpo getlink container_dn [options]"
.PP
List GPO Links for a container\&.
.SS "gpo list username [options]"
.PP
List GPOs for an account\&.
.SS "gpo listall"
.PP
List all GPOs\&.
.SS "gpo listcontainers gpo [options]"
.PP
List all linked containers for a GPO\&.
.SS "gpo setinheritance container_dn block|inherit [options]"
.PP
Set inheritance flag on a container\&.
.SS "gpo setlink container_dn gpo [options]"
.PP
Add or Update a GPO link to a container\&.
.SS "gpo show gpo [options]"
.PP
Show information for a GPO\&.
.SS "gpo manage symlink list"
.PP
List VGP Symbolic Link Group Policy from the sysvol
.SS "gpo manage symlink add"
.PP
Adds a VGP Symbolic Link Group Policy to the sysvol
.SS "gpo manage symlink remove"
.PP
Removes a VGP Symbolic Link Group Policy from the sysvol
.SS "gpo manage files list"
.PP
List VGP Files Group Policy from the sysvol
.SS "gpo manage files add"
.PP
Add VGP Files Group Policy to the sysvol
.SS "gpo manage files remove"
.PP
Remove VGP Files Group Policy from the sysvol
.SS "gpo manage openssh list"
.PP
List VGP OpenSSH Group Policy from the sysvol
.SS "gpo manage openssh set"
.PP
Sets a VGP OpenSSH Group Policy to the sysvol
.SS "gpo manage sudoers add"
.PP
Adds a Samba Sudoers Group Policy to the sysvol\&.
.SS "gpo manage sudoers list"
.PP
List Samba Sudoers Group Policy from the sysvol\&.
.SS "gpo manage sudoers remove"
.PP
Removes a Samba Sudoers Group Policy from the sysvol\&.
.SS "gpo manage scripts startup list"
.PP
List VGP Startup Script Group Policy from the sysvol
.SS "gpo manage scripts startup add"
.PP
Adds VGP Startup Script Group Policy to the sysvol
.SS "gpo manage scripts startup remove"
.PP
Removes VGP Startup Script Group Policy from the sysvol
.SS "gpo manage motd list"
.PP
List VGP MOTD Group Policy from the sysvol\&.
.SS "gpo manage motd set"
.PP
Sets a VGP MOTD Group Policy to the sysvol
.SS "gpo manage issue list"
.PP
List VGP Issue Group Policy from the sysvol\&.
.SS "gpo manage issue set"
.PP
Sets a VGP Issue Group Policy to the sysvol
.SS "gpo manage access add"
.PP
Adds a VGP Host Access Group Policy to the sysvol
.SS "gpo manage access list"
.PP
List VGP Host Access Group Policy from the sysvol
.SS "gpo manage access remove"
.PP
Remove a VGP Host Access Group Policy from the sysvol
.SS "group"
.PP
Manage groups\&.
.SS "group add groupname [options]"
.PP
Create a new AD group\&.
.SS "group create groupname [options]"
.PP
Add a new AD group\&. This is a synonym for the
samba\-tool group add
command and is available for compatibility reasons only\&. Please use
samba\-tool group add
instead\&.
.SS "group addmembers groupname members [options]"
.PP
Add members to an AD group\&.
.SS "group delete groupname [options]"
.PP
Delete an AD group\&.
.SS "group edit groupname"
.PP
Edit a group AD object\&.
.PP
\-\-editor=EDITOR
.RS 4
Specifies the editor to use instead of the system default, or \*(Aqvi\*(Aq if no system default is set\&.
.RE
.SS "group list"
.PP
List all groups\&.
.SS "group listmembers groupname [options]"
.PP
List all members of the specified AD group\&.
.PP
By default the sAMAccountNames are listed\&. If no sAMAccountName is available, the CN will be used instead\&.
.PP
\-\-full\-dn
.RS 4
List the distinguished names instead of the sAMAccountNames\&.
.RE
.PP
\-\-hide\-expired
.RS 4
Do not list expired group members\&.
.RE
.PP
\-\-hide\-disabled
.RS 4
Do not list disabled group members\&.
.RE
.SS "group move groupname new_parent_dn [options]"
.PP
This command moves a group into the specified organizational unit or container\&.
.PP
The groupname specified on the command is the sAMAccountName\&.
.PP
The name of the organizational unit or container can be specified as a full DN or without the domainDN component\&.
.PP

.SS "group removemembers groupname members [options]"
.PP
Remove members from the specified AD group\&.
.SS "group show groupname [options]"
.PP
Show group object and it\*(Aqs attributes\&.
.SS "group stats [options]"
.PP
Show statistics for overall groups and group memberships\&.
.SS "group rename groupname [options]"
.PP
Rename a group and related attributes\&.
.PP
This command allows to set the group\*(Aqs name related attributes\&. The group\*(Aqs CN will be renamed automatically\&. The group\*(Aqs CN will be the sAMAccountName\&. Use the \-\-force\-new\-cn option to specify the new CN manually and the \-\-reset\-cn to reset this change\&.
.PP
Use an empty attribute value to remove the specified attribute\&.
.PP
The groupname specified on the command is the sAMAccountName\&.
.PP
\-\-force\-new\-cn=NEW_CN
.RS 4
Specify a new CN (RDN) instead of using the sAMAccountName\&.
.RE
.PP
\-\-reset\-cn
.RS 4
Set the CN to the sAMAccountName\&.
.RE
.PP
\-\-mail\-address=MAIL_ADDRESS
.RS 4
New mail address
.RE
.PP
\-\-samaccountname=SAMACCOUNTNAME
.RS 4
New account name (sAMAccountName/logon name)
.RE
.SS "ldapcmp \fIURL1\fR \fIURL2\fR \fIdomain|configuration|schema|dnsdomain|dnsforest\fR [options]"
.PP
Compare two LDAP databases\&.
.SS "ntacl"
.PP
Manage NT ACLs\&.
.SS "ntacl changedomsid original-domain-SID new-domain-SID file [options]"
.PP
Change the domain SID for ACLs\&. Can be used to change all entries in acl_xattr when the machine\*(Aqs SID has accidentally changed or the data set has been copied to another machine either via backup/restore or rsync\&.
.PP
\-\-use\-ntvfs
.RS 4
Set the ACLs directly to the TDB or xattr\&. The POSIX permissions will NOT be changed, only the NT ACL will be stored\&.
.RE
.PP
\-\-service=SERVICE
.RS 4
Specify the name of the smb\&.conf service to use\&. This option is required in combination with the \-\-use\-s3fs option\&.
.RE
.PP
\-\-use\-s3fs
.RS 4
Set the ACLs for use with the default s3fs file server via the VFS layer\&. This option requires a smb\&.conf service, specified by the \-\-service=SERVICE option\&.
.RE
.PP
\-\-xattr\-backend=[native|tdb]
.RS 4
Specify the xattr backend type (native fs or tdb)\&.
.RE
.PP
\-\-eadb\-file=EADB_FILE
.RS 4
Name of the tdb file where attributes are stored\&.
.RE
.PP
\-\-recursive
.RS 4
Set the ACLs for directories and their contents recursively\&.
.RE
.PP
\-\-follow\-symlinks
.RS 4
Follow symlinks when \-\-recursive is specified\&.
.RE
.PP
\-\-verbose
.RS 4
Verbosely list files and ACLs which are being processed\&.
.RE
.SS "ntacl get file [options]"
.PP
Get ACLs on a file\&.
.SS "ntacl set acl file [options]"
.PP
Set ACLs on a file\&.
.SS "ntacl sysvolcheck"
.PP
Check sysvol ACLs match defaults (including correct ACLs on GPOs)\&.
.SS "ntacl sysvolreset"
.PP
Reset sysvol ACLs to defaults (including correct ACLs on GPOs)\&.
.SS "ou"
.PP
Manage organizational units (OUs)\&.
.SS "ou add ou_dn [options]"
.PP
Add a new organizational unit\&.
.PP
The name of the organizational unit can be specified as a full DN or without the domainDN component\&.
.PP
\-\-description=DESCRIPTION
.RS 4
Specify OU\*(Aqs description\&.
.RE
.SS "ou create ou_dn [options]"
.PP
Add a new organizational unit\&. This is a synonym for the
samba\-tool ou add
command and is available for compatibility reasons only\&. Please use
samba\-tool ou add
instead\&.
.SS "ou delete ou_dn [options]"
.PP
Delete an organizational unit\&.
.PP
The name of the organizational unit can be specified as a full DN or without the domainDN component\&.
.PP
\-\-force\-subtree\-delete
.RS 4
Delete organizational unit and all children recursively\&.
.RE
.SS "ou list [options]"
.PP
List all organizational units\&.
.PP
\-\-full\-dn
.RS 4
Display DNs including the base DN\&.
.RE
.SS "ou listobjects ou_dn [options]"
.PP
List all objects in an organizational unit\&.
.PP
The name of the organizational unit can be specified as a full DN or without the domainDN component\&.
.PP
\-\-full\-dn
.RS 4
Display DNs including the base DN\&.
.RE
.PP
\-r|\-\-recursive
.RS 4
List objects recursively\&.
.RE
.SS "ou move old_ou_dn new_parent_dn [options]"
.PP
Move an organizational unit\&.
.PP
The name of the organizational units can be specified as a full DN or without the domainDN component\&.
.SS "ou rename old_ou_dn new_ou_dn [options]"
.PP
Rename an organizational unit\&.
.PP
The name of the organizational units can be specified as a full DN or without the domainDN component\&.
.SS "rodc"
.PP
Manage Read\-Only Domain Controller (RODC)\&.
.SS "rodc preload SID|DN|accountname [options]"
.PP
Preload one account for an RODC\&.
.SS "schema"
.PP
Manage and query schema\&.
.SS "schema attribute modify attribute [options]"
.PP
Modify the behaviour of an attribute in schema\&.
.SS "schema attribute show attribute [options]"
.PP
Display an attribute schema definition\&.
.SS "schema attribute show_oc attribute [options]"
.PP
Show objectclasses that MAY or MUST contain this attribute\&.
.SS "schema objectclass show objectclass [options]"
.PP
Display an objectclass schema definition\&.
.SS "shell"
.PP
Opens an interactive Samba Python shell\&.
.SS "shell [options]"
.PP
Opens an interactive Python shell for Samba ldb connection\&.
.PP
\-H, \-\-URL
.RS 4
LDB URL for database or target server\&.
.RE
.SS "sites"
.PP
Manage sites\&.
.SS "sites list [options]"
.PP
List sites\&.
.PP
\-\-json
.RS 4
Output as JSON instead of a list
.RE
.SS "sites view site [options]"
.PP
View site details\&.
.SS "sites create site [options]"
.PP
Create a new site\&.
.SS "sites remove site [options]"
.PP
Delete an existing site\&.
.SS "sites subnet list site [options]"
.PP
List subnets for a site\&.
.PP
\-\-json
.RS 4
Output as JSON instead of a list
.RE
.SS "sites subnet view subnet [options]"
.PP
View subnet details\&.
.SS "sites subnet create subnet site-of-subnet [options]"
.PP
Create a new subnet\&.
.SS "sites subnet remove subnet [options]"
.PP
Delete an existing subnet\&.
.SS "sites subnet set-site subnet site-of-subnet [options]"
.PP
Assign a subnet to a site\&.
.SS "spn"
.PP
Manage Service Principal Names (SPN)\&.
.SS "spn add name user [options]"
.PP
Create a new SPN\&.
.SS "spn delete name [user] [options]"
.PP
Delete an existing SPN\&.
.SS "spn list user [options]"
.PP
List SPNs of a given user\&.
.SS "testparm"
.PP
Check the syntax of the configuration file\&.
.SS "time"
.PP
Retrieve the time on a server\&.
.SS "user"
.PP
Manage users\&.
.SS "user add username [password]"
.PP
Add a new user to the Active Directory Domain\&.
.SS "user create username [password]"
.PP
Add a new user\&. This is a synonym for the
samba\-tool user add
command and is available for compatibility reasons only\&. Please use
samba\-tool user add
instead\&.
.SS "user delete username [options]"
.PP
Delete an existing user account\&.
.SS "user disable username"
.PP
Disable a user account\&.
.SS "user edit username"
.PP
Edit a user account AD object\&.
.PP
\-\-editor=EDITOR
.RS 4
Specifies the editor to use instead of the system default, or \*(Aqvi\*(Aq if no system default is set\&.
.RE
.SS "user enable username"
.PP
Enable a user account\&.
.SS "user list"
.PP
List all users\&.
.PP
By default the user\*(Aqs sAMAccountNames are listed\&.
.PP
\-\-full\-dn
.RS 4
List user\*(Aqs distinguished names instead of the sAMAccountNames\&.
.RE
.PP
\-b BASE_DN|\-\-base\-dn=BASE_DN
.RS 4
Specify base DN to use\&. Only users under the specified base DN will be listed\&.
.RE
.PP
\-\-hide\-expired
.RS 4
Do not list expired user accounts\&.
.RE
.PP
\-\-hide\-disabled
.RS 4
Do not list disabled user accounts\&.
.RE
.SS "user setprimarygroup username primarygroupname"
.PP
Set the primary group a user account\&.
.SS "user getgroups username"
.PP
Get the direct group memberships of a user account\&.
.SS "user show username [options]"
.PP
Display a user AD object\&.
.PP
\-\-attributes=USER_ATTRS
.RS 4
Comma separated list of attributes, which will be printed\&.
.RE
.SS "user move username new_parent_dn [options]"
.PP
This command moves a user account into the specified organizational unit or container\&.
.PP
The username specified on the command is the sAMAccountName\&.
.PP
The name of the organizational unit or container can be specified as a full DN or without the domainDN component\&.
.SS "user password [options]"
.PP
Change password for a user account (the one provided in authentication)\&.
.SS "user rename username [options]"
.PP
Rename a user and related attributes\&.
.PP
This command allows to set the user\*(Aqs name related attributes\&. The user\*(Aqs CN will be renamed automatically\&. The user\*(Aqs new CN will be made up by combining the given\-name, initials and surname\&. A dot (\*(Aq\&.\*(Aq) will be appended to the initials automatically, if required\&. Use the \-\-force\-new\-cn option to specify the new CN manually and \-\-reset\-cn to reset this change\&.
.PP
Use an empty attribute value to remove the specified attribute\&.
.PP
The username specified on the command is the sAMAccountName\&.
.PP
\-\-surname=SURNAME
.RS 4
New surname
.RE
.PP
\-\-given\-name=GIVEN_NAME
.RS 4
New given name
.RE
.PP
\-\-initials=INITIALS
.RS 4
New initials
.RE
.PP
\-\-force\-new\-cn=NEW_CN
.RS 4
Specify a new CN (RDN) instead of using a combination of the given name, initials and surname\&.
.RE
.PP
\-\-reset\-cn
.RS 4
Set the CN to the default combination of given name, initials and surname\&.
.RE
.PP
\-\-display\-name=DISPLAY_NAME
.RS 4
New display name
.RE
.PP
\-\-mail\-address=MAIL_ADDRESS
.RS 4
New email address
.RE
.PP
\-\-samaccountname=SAMACCOUNTNAME
.RS 4
New account name (sAMAccountName/logon name)
.RE
.PP
\-\-upn=UPN
.RS 4
New user principal name
.RE
.SS "user setexpiry username [options]"
.PP
Set the expiration of a user account\&.
.SS "user setpassword username [options]"
.PP
Sets or resets the password of a user account\&.
.SS "user unlock username [options]"
.PP
This command unlocks a user account in the Active Directory domain\&.
.SS "user getpassword username [options]"
.PP
Gets the password of a user account\&.
.SS "user get-kerberos-ticket username [options]"
.PP
Gets a Kerberos Ticket Granting Ticket as the account\&.
.SS "user syncpasswords --cache-ldb-initialize [options]"
.PP
Syncs the passwords of all user accounts, using an optional script\&.
.PP
Note that this command should run on a single domain controller only (typically the PDC\-emulator)\&.
.SS "user auth policy assign username [options]"
.PP
Set assigned authentication policy for user\&.
.PP
\-\-policy
.RS 4
Name of authentication policy to assign or leave empty to remove\&.
.RE
.SS "user auth policy remove username"
.PP
Remove assigned authentication policy from user\&.
.SS "user auth policy view username"
.PP
View the assigned authentication policy for user\&.
.SS "user auth silo assign username [options]"
.PP
Set assigned authentication silo for user\&.
.PP
\-\-silo
.RS 4
Name of authentication silo to assign or leave empty to remove\&.
.RE
.SS "user auth silo remove username"
.PP
Remove assigned authentication silo from user\&.
.SS "user auth silo view username"
.PP
View the assigned authentication silo for user\&.
.SS "vampire [options] \fIdomain\fR"
.PP
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\&.
.SS "visualize [options] \fIsubcommand\fR"
.PP
Produce graphical representations of Samba network state\&. To work out what is happening in a replication graph, it is sometimes helpful to use visualisations\&.
.PP
There are two subcommands, two graphical modes, and (roughly) two modes of operation with respect to the location of authority\&.
.SS "MODES OF OPERATION"
.PP
samba\-tool visualize ntdsconn
.RS 4
Looks at NTDS connections\&.
.RE
.PP
samba\-tool visualize reps
.RS 4
Looks at repsTo and repsFrom objects\&.
.RE
.PP
samba\-tool visualize uptodateness
.RS 4
Looks at replication lag as shown by the uptodateness vectors\&.
.RE
.SS "GRAPHICAL MODES"
.PP
\-\-distance
.RS 4
Distances between DCs are shown in a matrix in the terminal\&.
.RE
.PP
\-\-dot
.RS 4
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\&.
.RE
.PP
\-\-xdot
.RS 4
Generate Graphviz dot output as with
[\-\-dot]
and attempt to view it immediately using
/usr/bin/xdot\&.
.RE
.PP
\-r
.RS 4
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\&.
.RE
.SS "help"
.PP
Gives usage information\&.
.SH "VERSION"
.PP
This man page is complete for version 4\&.20\&.1 of the Samba suite\&.
.SH "AUTHOR"
.PP
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\&.