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
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
|
<html>
<body bgcolor="#ffffff">
<img src="samba2_xs.gif" border="0" alt=" " height="100" width="76"
hspace="10" align="left" />
<h1 class="head0">Appendix C. Summary of Samba Daemons and Commands</h1>
<p>This appendix is a reference listing of command-line options and
other information to help you use the programs that come with the
Samba distribution.</p>
<div class="sect1"><a name="samba2-APP-C-SECT-1"/>
<h2 class="head1">Samba Daemons</h2>
<p>The following sections provide information about the command-line
parameters for <em class="emphasis">smbd</em>, <em class="emphasis">nmbd</em>,
and <em class="emphasis">winbindd</em>.</p>
</div>
<a name="INDEX-1"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbd</em> program provides
Samba's file and printer services, using one TCP/IP
stream and one daemon per client. It is controlled from
<em class="filename">/usr/local/samba/lib/smb.conf</em>, the default
configuration file, which can be overridden by command-line options.</p><p>The configuration file is automatically reevaluated every minute. If
it has changed, most new options are immediately effective. You can
force Samba to reload the configuration file immediately by sending a
SIGHUP signal to <em class="emphasis">smbd</em>. Reloading the
configuration file does not affect any clients that are already
connected. To escape this condition, a client would need to
disconnect and reconnect, or the server itself would have to be
restarted, forcing all clients to reconnect.</p>
<div class="sect1"><a name="appc-5-fm2xml"/>
<h4 class="refsect1">Other Signals</h4>
<p>To shut down an <em class="emphasis">smbd</em> process, send it the
termination signal SIGTERM (15), which allows it to die gracefully,
instead of a SIGKILL (9). With Samba versions prior to 2.2, the
debugging level could be raised or lowered using SIGUSR1 or SIGUSR2.
This is no longer supported. Use <em class="emphasis">smbcontrol</em>
instead.</p>
</div>
<div class="sect1"><a name="appc-6-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbd <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-7-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-a</tt></b></dt>
<dd>
<p>Causes each new connection to the Samba server to append all logging
messages to the log file. This option is the opposite of
<tt class="literal">-o</tt> and is the default.</p>
</dd>
<dt><b><tt class="literal">-D</tt></b></dt>
<dd>
<p>Runs the <em class="emphasis">smbd</em> program as a daemon. This is the
recommended way to use <em class="emphasis">smbd</em>. It is also the
default action when <em class="emphasis">smbd</em> is run from an
interactive command line. In addition, <em class="emphasis">smbd</em> can
be run from <em class="emphasis">inetd</em>.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Specifying the value on the command line overrides the
value specified in the <em class="filename">smb.conf</em> file. Debug
level 0 logs only the most important messages; level 1 is normal;
levels 3 and above are primarily for debugging and slow
<em class="emphasis">smbd</em> considerably.</p>
</dd>
<dt><b><tt class="literal">-h</tt> </b></dt>
<dd>
<p>Prints usage information for the <em class="emphasis">smbd</em> command.</p>
</dd>
<dt><b><tt class="literal">-i</tt></b></dt>
<dd>
<p>Runs <em class="emphasis">smbd</em> interactively, rather than as a
daemon. This option is used to override the default daemon mode when
<em class="emphasis">smbd</em> is run from the command line.</p>
</dd>
<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ directory</em></b></dt>
<dd>
<p>Sends the log messages to somewhere other than the location compiled
into the executable or specified in the <em class="filename">smb.conf</em>
file. The default is often
<em class="filename">/usr/local/samba/var/</em>,
<em class="filename">/usr/samba/var/</em>, or
<em class="filename">/var/log/</em>. The log file is placed in the
specified directory and named <em class="filename">log.smbd</em>. If the
directory does not exist, Samba's compiled-in
default will be used.</p>
</dd>
<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
<dd>
<p>Sets the TCP/IP socket options, using the same parameters as the
<tt class="literal">socket options</tt> configuration option. Often used
for performance tuning and testing.</p>
</dd>
<dt><b><tt class="literal">-o</tt></b></dt>
<dd>
<p>Causes log files to be overwritten when opened (the opposite of
<tt class="literal">-a</tt>). Using this option saves you from hunting for
the right log entries if you are performing a series of tests and
inspecting the log file each time.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
<dd>
<p>Sets the TCP/IP port number from which the server will accept
requests. All Microsoft clients send to the default port of 139,
except for Windows 2000/XP, which can use port 445 for SMB
networking, without the NetBIOS protocol layer.</p>
</dd>
<dt><b><tt class="literal">-P</tt></b></dt>
<dd>
<p>Causes <em class="emphasis">smbd</em> to run in
"passive" mode, in which it just
listens, and does not transmit any network traffic. This is useful
only for debugging by developers.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file. Although the
file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
you can override it on the command line. Typically used for
debugging.</p>
</dd>
<dt><b><tt class="literal">-v</tt></b></dt>
<dd>
<p>Prints the current version of Samba.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-2"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>nmbd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">nmbd</em> program is Samba's
NetBIOS name service and browsing daemon. It replies to NetBIOS over
TCP/IP (also called NetBT or NBT) name-service requests broadcast
from SMB clients, and optionally to Microsoft's
Windows Internet Name Service (WINS) requests. Both are versions of
the name-to-address lookup required by SMB clients. The broadcast
version uses UDP broadcast on the local subnet only, while WINS uses
TCP, which can be routed. If running as a WINS server,
<em class="emphasis">nmbd</em> keeps a current name and address database
in the file <em class="filename">/usr/local/samba/var/locks/wins.dat</em>.</p><p>An active <em class="emphasis">nmbd</em> daemon also responds to browsing
protocol requests used by the Windows Network Neighborhood. This
protocol provides a dynamic directory of servers, as well as the
disks and printers that the servers are providing. As with WINS, this
was initially done by making UDP broadcasts on the local subnet. With
the addition of the local master browser to the network architecture,
it is done by making TCP connections to a server. If
<em class="emphasis">nmbd</em> is acting as a local master browser, it
stores the browsing database in the file
<em class="filename">/usr/local/samba/var/locks/browse.dat</em>.</p><p>Some clients (especially older ones) cannot use the WINS protocol. To
support these clients, <em class="emphasis">nmbd</em> can act as a WINS
proxy, accepting broadcast requests from the non-WINS clients,
contacting a WINS server on their behalf, and returning the WINS
server's response to them.</p>
<div class="sect1"><a name="appc-9-fm2xml"/>
<h4 class="refsect1">Signals</h4>
<p>Like <em class="emphasis">smbd</em>, the <em class="emphasis">nmbd</em> program
responds to several Unix signals. Sending <em class="emphasis">nmbd</em> a
SIGHUP signal causes it to dump the names it knows about to the
<em class="filename">/usr/local/samba/var/locks/namelist.debug</em> file.
To shut down an <em class="emphasis">nmbd</em> process and allow it to die
gracefully, send it a SIGTERM (15) signal, rather than a SIGKILL (9).
With Samba versions prior to 2.2, the debugging level could be raised
or lowered using SIGUSR1 or SIGUSR2. This is no longer supported. Use
<em class="emphasis">smbcontrol</em> instead.</p>
</div>
<div class="sect1"><a name="appc-10-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">nmbd <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-11-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-a</tt></b></dt>
<dd>
<p>Causes each new connection to the Samba server to append all logging
messages to the log file. This option is the opposite of
<tt class="literal">-o</tt> and is the default.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Specifying the value on the command line overrides the
value specified in the <em class="filename">smb.conf</em> file. Debug
level 0 logs only the most important messages; level 1 is normal;
levels 3 and above are primarily for debugging and slow
<em class="emphasis">nmbd</em> considerably.</p>
</dd>
<dt><b><tt class="literal">-D</tt></b></dt>
<dd>
<p>Instructs the <em class="emphasis">nmbd</em> program to run as a daemon.
This is the recommended way to use <em class="emphasis">nmbd</em> and is
the default when <em class="emphasis">nmbd</em> is run from an interactive
shell. In addition, <em class="emphasis">nmbd</em> can be run from
<em class="emphasis">inetd</em>.</p>
</dd>
<dt><b><tt class="literal">-h</tt> </b></dt>
<dd>
<p>Prints usage information for the <em class="emphasis">nmbd</em> command.</p>
</dd>
<dt><b><tt class="literal">-H</tt> <em class="replaceable">lmhosts_ file</em></b></dt>
<dd>
<p>Specifies the location of the <em class="emphasis">lmhosts</em> file for
name resolution. This file is used only to resolve names for the
local server, and not to answer queries from remote systems. The
compiled-in default is commonly
<em class="filename">/usr/local/samba/lib/lmhosts</em>,
<em class="filename">/usr/samba/lib/lmhosts</em>, or
<em class="filename">/etc/lmhosts</em>.</p>
</dd>
<dt><b><tt class="literal">-i</tt></b></dt>
<dd>
<p>Runs <em class="emphasis">nmbd</em> interactively, rather than as a
daemon. This option is used to override the default daemon mode when
<em class="emphasis">nmbd</em> is run from the command line.</p>
</dd>
<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ file</em></b></dt>
<dd>
<p>Sends the log messages to somewhere other than the location compiled
into the executable or specified in the <em class="filename">smb.conf</em>
file. The default is often
<em class="filename">/usr/local/samba/var/log.nmbd</em>,
<em class="emphasis">/usr/samba/var/log.nmbd</em>, or <em class="emphasis">/var/log
/log.nmbd</em>.</p>
</dd>
<dt><b><tt class="literal">-n</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
<dd>
<p>Allows you to override the NetBIOS name by which the daemon
advertises itself. Specifying this option on the command line
overrides the <tt class="literal">netbios name</tt> option in the Samba
configuration file.</p>
</dd>
<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
<dd>
<p>Sets the TCP/IP socket options, using the same parameters as the
<tt class="literal">socket options</tt> configuration option. Often used
for performance tuning and testing.</p>
</dd>
<dt><b><tt class="literal">-o</tt></b></dt>
<dd>
<p>Causes log files to be overwritten when opened (the opposite of
<tt class="literal">-a</tt>). This option saves you from hunting for the
right log entries if you are performing a series of tests and
inspecting the log file each time.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
<dd>
<p>Sets the UDP port number from which the server accepts requests.
Currently, all Microsoft clients use only the default port, 137.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file. Although the
file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
you can override it here on the command line. Typically used for
debugging.</p>
</dd>
<dt><b><tt class="literal">-v</tt></b></dt>
<dd>
<p>Prints the current version of Samba.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-3"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>winbindd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">winbindd</em> daemon is part of the winbind
service and is used to allow Unix systems to obtain user and group
information from a Windows NT/2000 server. Winbind maps Windows
relative IDs (RIDs) to Unix UIDs and GIDs and allows accounts stored
on the Windows server to be used for Unix authentication. Its purpose
is to ease integration of Microsoft and Unix networks when a
preexisting Windows domain controller is set up to handle user and
computer accounts.</p><p>The daemon is accessed by users via the name service switch and PAM.
The name service switch calls a library
(<em class="filename">/lib/libnss_winbind.so</em>), which calls the
daemon, which in turn calls the Windows NT/2000 server using
Microsoft RPC. The PAM module for winbind can call the daemon
similarly, allowing users whose accounts are stored on the Windows
server to log in to the Unix system and run an interactive shell,
FTP, or any other program that authenticates users through PAM.</p><p>The winbind subsystem is currently available only for the Linux
operating system and a few other systems that use shared libraries,
nsswitch and PAM.</p>
<div class="sect1"><a name="appc-13-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">winbindd <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-14-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Specifying the value on the command line overrides the
value specified in the <em class="filename">smb.conf</em> file. Debug
level 0 logs only the most important messages; level 1 is normal;
levels 3 and above are primarily for debugging.</p>
</dd>
<dt><b><tt class="literal">-i</tt></b></dt>
<dd>
<p>Runs <em class="emphasis">winbindd</em> interactively. This option is used
to override the default, which is for winbindd to detach and run as a
daemon.</p>
</dd>
</dl>
</div>
</div>
<div class="sect1"><a name="samba2-APP-C-SECT-2"/>
<h2 class="head1">Samba Distribution Programs</h2>
<p>This section lists the command-line options and subcommands provided
by each nondaemon program in the Samba distribution.</p>
</div>
<a name="INDEX-4"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>findsmb</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This Perl script reports information about systems on the subnet that
respond to SMB name-query requests. The report includes the IP
address, NetBIOS name, workgroup/domain, and operating system of each
system.</p>
<div class="sect1"><a name="appc-17-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">findsmb <em class="replaceable">[subnet_broadcast_address]</em></pre></blockquote>
<p>If a different subnet's broadcast address is
provided, it will find SMB servers on that subnet. If no subnet
broadcast address is supplied, <em class="emphasis">findsmb</em> will look
on the local subnet.</p>
<p>The output from <em class="emphasis">findsmb</em> looks like this:</p>
<blockquote><pre class="code">$ <tt class="userinput"><b>findsmb</b></tt>
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
172.16.1.1 TOLTEC *[METRAN] [Unix] [Samba 2.2.6]
172.16.1.3 MIXTEC +[METRAN] [Unix] [Samba 2.2.6]
172.16.1.4 ZAPOTEC [METRAN] [Windows 5.0] [Windows 2000 LAN Manager]
172.16.1.5 HUASTEC [ METRAN ]
172.16.1.6 MAYA [ METRAN ]
172.16.1.7 OLMEC [METRAN] [Windows 5.1] [Windows 2000 LAN Manager]
172.16.1.10 UTE [ METRAN ]
172.16.1.13 DINE [METRAN] [Windows NT 4.0] [NT LAN Manager 4.0]</pre></blockquote>
<p>The system with an asterisk (<tt class="literal">*</tt>) in front of its
workgroup name is the domain master browser for the workgroup/domain,
and the system with a plus sign (+) preceding its workgroup name is
the local master browser.</p>
<p>The <em class="emphasis">findsmb</em> command was introduced during the
development of Samba 2.2 and is installed by default in Samba
Versions 2.2.5 and later.</p>
</div>
</div>
<a name="INDEX-5"/><a name="INDEX-6"/><a name="INDEX-7"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>make_smbcodepage</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program is part of the
<a name="INDEX-6"/>internationalization features of
Samba 2.2 and is obsolete in Samba 3.0, which supports
<a name="INDEX-7"/>Unicode
automatically. The <em class="emphasis">make_smbcodepage</em> program
compiles a binary codepage file from a text-format codepage
definition. It can also perform the reverse operation, decompiling a
binary codepage file into a text version. Examples of text-format
codepage files can be found in the Samba distribution in the
<em class="filename">source/codepages</em> directory. After Samba has been
installed, examples of binary codepages can be found in the directory
<em class="filename">/usr/local/samba/lib/codepages</em>.</p>
<div class="sect1"><a name="appc-19-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">make_smbcodepage <em class="replaceable">c|d codepage_number input_file output_file</em></pre></blockquote>
<p>For the first argument, use <tt class="literal">c</tt> to compile a
codepage and <tt class="literal">d</tt> to decompile a codepage file. The
<em class="replaceable">codepage_number</em> argument is the number of
the codepage being processed (e.g., 850). The
<em class="replaceable">input_file</em> and
<em class="replaceable">output_file</em> are the text- and
binary-format codepages, with the types dependent on the operation
(compiling or decompiling) that is being performed.</p>
</div>
</div>
<a name="INDEX-8"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>make_unicodemap</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program is part of the internationalization features of Samba
2.2 and is obsolete in Samba 3.0, which supports Unicode
automatically. The <em class="emphasis">make_unicodemap</em> command
compiles binary Unicode maps from text files, so Samba can display
non-ASCII characters in file and directory names via the Unicode
international alphabets. Examples of input mapping files can be found
in the directory <em class="filename">source/codepages</em> in the Samba
source distribution.</p>
<div class="sect1"><a name="appc-21-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">make_unicodemap <em class="replaceable">codepage_number inputfile outputfile</em></pre></blockquote>
<p>The input file is an ASCII map; the output file is a binary file
loadable by Samba. The codepage is the number of the DOS codepage
(e.g., 850) for the map.</p>
</div>
</div>
<a name="INDEX-9"/><a name="INDEX-10"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>net</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">net</em> command, new to Samba 3.0, is a program
with a syntax similar to the MS-DOS/Windows command of the same name.
It is used for performing various administrative functions related to
Windows networking, which can be executed either locally or on a
remote system.</p>
<div class="sect1"><a name="appc-23-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">net <em class="replaceable">[method] function [misc_options] [target_options]</em></pre></blockquote>
<p>The <em class="replaceable">function</em> argument is made up of one or
more space-separated words. In Windows terminology, it is sometimes
referred to as a function with options. Here we list every function
in its complete form, including multiple words.</p>
<p>By default, the action is performed on the local system. The
<em class="replaceable">target_options</em> argument can be used to
specify a remote system (either by hostname or IP address), a domain,
or a workgroup.</p>
<p>Depending on the function, the <em class="replaceable">method</em>
argument can be optional, required, or disallowed. It specifies one
of three methods for performing the operation specified by the rest
of the command. It can be <tt class="literal">ads</tt> (Active Directory),
<tt class="literal">rpc</tt> (Microsoft's DCE/RPC), or
<tt class="literal">rap</tt> (Microsoft's original SMB
remote procedure call). To determine which methods (if any) can be
used with a function, the <tt class="literal">net help ads</tt>,
<tt class="literal">net help rap</tt>, and <tt class="literal">net help rpc</tt>
commands can be used to list the functions for each method.</p>
</div>
<div class="sect1"><a name="appc-24-fm2xml"/>
<h4 class="refsect1">Miscellaneous options</h4>
<dl>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">level</em></b></dt>
<dt><b><tt class="literal">--debug=l</tt><em class="replaceable">evel</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10.</p>
</dd>
<dt><b><tt class="literal">-l</tt></b></dt>
<dt><b><tt class="literal">--long</tt></b></dt>
<dd>
<p><tt class="literal">S</tt>pecifies the long listing mode. This is provided
for functions that print informational listings.</p>
</dd>
<dt><b><tt class="literal">-n</tt> <em class="replaceable">name</em></b></dt>
<dt><b><tt class="literal">--myname</tt><em class="emphasis">=</em><em class="replaceable">name</em></b></dt>
<dd>
<p>Specifies the NetBIOS name for the client.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">port</em></b></dt>
<dt><b><tt class="literal">--port</tt><em class="emphasis">=</em><em class="replaceable">port</em></b></dt>
<dd>
<p>Specifies the port number to use.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
<dt><b><tt class="literal">--conf</tt><em class="emphasis">=</em><em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the name of the Samba configuration file, overriding the
compiled-in default.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
<dt><b><tt class="literal">--user</tt><em class="emphasis">=</em><em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
<dd>
<p>Specifies the username and, optionally, the password to use for
functions that require authentication.</p>
</dd>
<dt><b><tt class="literal">-W</tt> <em class="replaceable">name</em></b></dt>
<dt><b><tt class="literal">--myworkgroup</tt>=<em class="replaceable">name</em></b></dt>
<dd>
<p>Specifies the name of the client's workgroup,
overriding the definition of the <tt class="literal">workgroup</tt>
parameter in the Samba configuration file.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-25-fm2xml"/>
<h4 class="refsect1">Target options</h4>
<dl>
<dt><b><tt class="literal">-S</tt> <em class="replaceable">hostname</em></b></dt>
<dd>
<p>Specifies the remote system using a hostname or NetBIOS name.</p>
</dd>
<dt><b><tt class="literal">-I</tt> <em class="replaceable">ip_address</em></b></dt>
<dd>
<p>Specifies the remote system using its IP address.</p>
</dd>
<dt><b><tt class="literal">-w</tt> <em class="replaceable">workgroup</em></b></dt>
<dd>
<p>Specifies the name of the target domain or workgroup.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-26-fm2xml"/>
<h4 class="refsect1">Functions</h4>
<dl>
<dt><b><tt class="literal">abortshutdown</tt></b></dt>
<dd>
<p>See the <tt class="literal">rpc</tt> <tt class="literal">abortshutdown</tt>
function.</p>
</dd>
<dt><b><tt class="literal">ads</tt> <tt class="literal">info</tt></b></dt>
<dd>
<p>Prints information about the Active Directory server. The method
(<tt class="literal">ads</tt>) must be specified to differentiate this
function from the <tt class="literal">rpc info</tt> function.</p>
</dd>
<dt><b><tt class="literal">ads</tt> <tt class="literal">join</tt> <em class="replaceable">OU</em></b></dt>
<dd>
<p>Joins the local system to the Active Directory realm (organizational
unit) specified by OU. The method (<tt class="literal">ads</tt>) must be
specified to differentiate this function from the <tt class="literal">rpc
join</tt> function.</p>
</dd>
<dt><b><tt class="literal">ads</tt> <tt class="literal">leave</tt></b></dt>
<dd>
<p>Removes the local system from the Active Directory realm.</p>
</dd>
<dt><b><tt class="literal">ads password</tt> <em class="replaceable">username</em><tt class="literal">@</tt><em class="replaceable">REALM</em> <tt class="literal">-U</tt><em class="replaceable">admin_username</em><tt class="literal">@</tt><em class="replaceable">REALM</em><tt class="literal">%admin_</tt><em class="replaceable">password</em></b></dt>
<dd>
<p>Changes the Active Directory password for the user specified by
<em class="replaceable">username</em><tt class="literal">@</tt><em class="replaceable">REALM</em>.
The administrative account authentication information is specified
with the <tt class="literal">-U</tt> option. The Active Directory realm
must be supplied in all uppercase.</p>
</dd>
<dt><b><tt class="literal">ads printer info</tt> <em class="replaceable">[printer] [server]</em></b></dt>
<dd>
<p>Prints information on the specified printer on the specified server.
The <em class="replaceable">printer</em> argument defaults to an
asterisk (<tt class="literal">*</tt>), meaning all printers, and the
<em class="replaceable">server</em> argument defaults to
<tt class="literal">localhost</tt>.</p>
</dd>
<dt><b><tt class="literal">ads printer publish</tt> <em class="replaceable">printer_name</em></b></dt>
<dd>
<p>Publishes the specified printer in Active Directory.</p>
</dd>
<dt><b><tt class="literal">ads printer remove</tt> <em class="replaceable">printer_name</em></b></dt>
<dd>
<p>Removes the specified printer from Active Directory.</p>
</dd>
<dt><b><tt class="literal">ads search</tt> <em class="replaceable">expr attrib</em></b></dt>
<dd>
<p>Performs a raw Active Directory search, using the standard LDAP
search expression and attributes specified by the
<em class="replaceable">expr</em> and <em class="replaceable">attrib</em>
arguments, respectively.</p>
</dd>
<dt><b><tt class="literal">ads status</tt></b></dt>
<dd>
<p>Prints details about the Active Directory computer account of the
system.</p>
</dd>
<dt><b><tt class="literal">change localhost pass</tt></b></dt>
<dd>
<p>Changes the Active Directory password for the local
system's computer trust account.</p>
</dd>
<dt><b><tt class="literal">domain</tt></b></dt>
<dd>
<p>Lists the domains or workgroups on the network.</p>
</dd>
<dt><b><tt class="literal">file</tt></b></dt>
<dd>
<p>Lists open files on the server.</p>
</dd>
<dt><b><tt class="literal">file close</tt> <em class="replaceable">file_id</em></b></dt>
<dd>
<p>Closes the specified file.</p>
</dd>
<dt><b><tt class="literal">file info</tt> <em class="replaceable">file_id</em></b></dt>
<dd>
<p>Prints information about the specified file, which must be open.</p>
</dd>
<dt><b><tt class="literal">file user</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Lists all files opened on the server by the user specified by
<em class="replaceable">username</em>.</p>
</dd>
<dt><b><tt class="literal">group add</tt> <em class="replaceable">group_name</em></b></dt>
<dd>
<p>Adds the specified group. This function accepts the miscellaneous
option <tt class="literal">-C</tt> <em class="replaceable">comment</em>
(which can also be specified as <tt class="literal">-
-comment=</tt><em class="replaceable">string</em>) to set the
descriptive comment for the group.</p>
</dd>
<dt><b><tt class="literal">group delete</tt> <em class="replaceable">group_name</em></b></dt>
<dd>
<p>Deletes the specified group.</p>
</dd>
<dt><b><tt class="literal">groupmember add</tt> <em class="replaceable">group_name username</em></b></dt>
<dd>
<p>Adds the user specified by <em class="replaceable">username</em> to the
group specified by <em class="replaceable">group_name</em>.</p>
</dd>
<dt><b><tt class="literal">groupmember delete</tt> <em class="replaceable">group_name username</em></b></dt>
<dd>
<p>Deletes the user specified by <em class="replaceable">username</em>
from the group specified by <em class="replaceable">group_name</em>.</p>
</dd>
<dt><b><tt class="literal">groupmember list</tt> <em class="replaceable">group_name</em></b></dt>
<dd>
<p>Lists the users who are members of the specified group.</p>
</dd>
<dt><b><tt class="literal">help</tt></b></dt>
<dd>
<p>Prints a help message for the <em class="emphasis">net</em> command.</p>
</dd>
<dt><b><tt class="literal">help</tt> <em class="replaceable">method</em></b></dt>
<dd>
<p>Prints a help message for <em class="replaceable">method</em>, which
can be <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
<tt class="literal">rpc</tt>. This lists the functions that can use the
method, along with a brief description.</p>
</dd>
<dt><b><tt class="literal">help</tt> <em class="replaceable">function</em></b></dt>
<dd>
<p>Prints a help message for the specified function, which can be more
than one word.</p>
</dd>
<dt><b><tt class="literal">info</tt></b></dt>
<dd>
<p>Must be preceded by a method. See the <tt class="literal">ads</tt>
<tt class="literal">info</tt> and <tt class="literal">rpc</tt>
<tt class="literal">info</tt> functions.</p>
</dd>
<dt><b><tt class="literal">join</tt></b></dt>
<dd>
<p>Joins the computer to a Windows NT domain or Active Directory realm.
If the method argument is not specified, a check is made to determine
if Active Directory is in use, and if so, <tt class="literal">ads join</tt>
is performed. Otherwise, <tt class="literal">rpc join</tt> is run. See also
the <tt class="literal">ads join</tt> and <tt class="literal">rpc join</tt>
functions.</p>
</dd>
<dt><b><tt class="literal">leave</tt></b></dt>
<dd>
<p>Must be preceded by a method. See the <tt class="literal">ads</tt>
<tt class="literal">leave</tt> function.</p>
</dd>
<dt><b><tt class="literal">lookup dc</tt> <em class="replaceable">[domain]</em></b></dt>
<dd>
<p>Prints the IP address of the specified domain's
domain controllers. The domain defaults to the value of the
<tt class="literal">workgroup</tt> parameter in the Samba configuration
file.</p>
</dd>
<dt><b><tt class="literal">lookup host</tt> <em class="replaceable">hostname [type]</em></b></dt>
<dd>
<p>Prints the IP address of the specified host.</p>
</dd>
<dt><b><tt class="literal">lookup kdc</tt> <em class="replaceable">[realm]</em></b></dt>
<dd>
<p>Prints the IP address of the specified realm's
Kerberos domain controller. If <em class="replaceable">realm</em> is
not specified, it defaults to the value of the
<tt class="literal">realm</tt> parameter in the Samba configuration file.</p>
</dd>
<dt><b><tt class="literal">lookup ldap</tt> <em class="replaceable">[domain]</em></b></dt>
<dd>
<p>Prints the IP address of the specified domain's LDAP
server. If <em class="replaceable">domain</em> is not specified, it
defaults to the value of the <tt class="literal">workgroup</tt> parameter
in the Samba configuration file.</p>
</dd>
<dt><b><tt class="literal">lookup master</tt> <em class="replaceable">[domain]</em></b></dt>
<dd>
<p>Prints the IP address of the master browser of the specified domain
or workgroup. If <em class="replaceable">domain</em> is not specified,
it defaults to the value of the <tt class="literal">workgroup</tt>
parameter in the Samba configuration file.</p>
</dd>
<dt><b><tt class="literal">password</tt> <em class="replaceable">username old_password new_password</em></b></dt>
<dd>
<p>Changes the password for the user specified by the
<em class="replaceable">username</em> argument. The
user's old and new passwords are provided in plain
text as part of the command. Be careful regarding security issues.
See also the <tt class="literal">ads password</tt> function.</p>
</dd>
<dt><b><tt class="literal">printer info</tt></b></dt>
<dd>
<p>See the <tt class="literal">ads printer info</tt> function.</p>
</dd>
<dt><b><tt class="literal">printer publish</tt></b></dt>
<dd>
<p>See the <tt class="literal">ads printer publish</tt> function.</p>
</dd>
<dt><b><tt class="literal">printer remove</tt></b></dt>
<dd>
<p>See the <tt class="literal">ads printer remove</tt> function.</p>
</dd>
<dt><b><tt class="literal">printq</tt></b></dt>
<dd>
<p>Prints information (including the job IDs) about printer queues on
the server.</p>
</dd>
<dt><b><tt class="literal">printq delete</tt> <em class="replaceable">queue_name</em></b></dt>
<dd>
<p>Deletes the specified printer queue. The
<tt class="literal">-j</tt>
<em class="replaceable">job_id</em> (which can also be
specified as
<tt class="literal">--jobid</tt><em class="emphasis">=</em><em class="replaceable">job_id</em>
) option may be used to specify the job ID of the queue.</p>
</dd>
<dt><b><tt class="literal">rpc abortshutdown</tt></b></dt>
<dd>
<p>Aborts the shutdown of a remote server.</p>
</dd>
<dt><b><tt class="literal">rpc info</tt></b></dt>
<dd>
<p>Prints information about the server's domain. The
method (<tt class="literal">rpc</tt>) must be specified to differentiate
this function from the <tt class="literal">ads</tt> <tt class="literal">info</tt>
function.</p>
</dd>
<dt><b><tt class="literal">rpc join</tt> </b></dt>
<dd>
<p>Joins a computer to a Windows NT domain. If the <tt class="literal">-U</tt>
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
option is included, the specified username and password will be used
as the administrative account required for authenticating with the
PDC. If the <tt class="literal">-U</tt> option is not included, this
function can be used only to join the computer to the domain after
the computer account has been created using the Server Manager. The
method (<tt class="literal">rpc</tt>) must be specified to differentiate
this function from the <tt class="literal">ads</tt> <tt class="literal">join</tt>
function.</p>
</dd>
<dt><b><tt class="literal">rpc shutdown</tt></b></dt>
<dd>
<p>Shuts down a server. This function accepts the <tt class="literal">-r</tt>,
<tt class="literal">-f</tt>, <tt class="literal">-t</tt>, and
<tt class="literal">-c</tt> miscellaneous options. The
<tt class="literal">-r</tt> option (which can also be specified as
<tt class="literal">--reboot</tt>) requests that the system reboot after
shutting down. The <tt class="literal">-f</tt> option (which can also be
specified as <tt class="literal">--force</tt>) forces a shutdown. The
<tt class="literal">-t</tt> <em class="replaceable">timeout</em> option
(which can also be specified as <tt class="literal">-
-timeout=</tt><em class="replaceable">number</em>) specifies the
number of seconds to wait before shutting down, and the
<tt class="literal">-c</tt> <em class="replaceable">comment</em> option
(which can also be specified as <tt class="literal">-
-comment=</tt><em class="replaceable">string</em>) can be used to
specify a message to the client user. On Windows, the comment appears
in the Message area in the System Shutdown dialog box.</p>
</dd>
<dt><b><tt class="literal">rpc trustdom add</tt> <em class="replaceable">domain_name</em></b></dt>
<dd>
<p>Adds an account for the trust relationship with the specified Windows
NT domain.</p>
</dd>
<dt><b><tt class="literal">rpc trustdom establish</tt> <em class="replaceable">domain_name</em></b></dt>
<dd>
<p>Establishes a trust relationship with the specified Windows NT domain.</p>
</dd>
<dt><b><tt class="literal">rpc trustdom revoke</tt> <em class="replaceable">domain_name</em></b></dt>
<dd>
<p>Revokes the trust relationship with the specified Windows NT domain.</p>
</dd>
<dt><b><tt class="literal">search</tt></b></dt>
<dd>
<p>See the <tt class="literal">ads search</tt> function.</p>
</dd>
<dt><b><tt class="literal">server</tt></b></dt>
<dd>
<p>Lists servers in the domain or workgroup, which defaults to the value
of the <tt class="literal">workgroup</tt> parameter in the Samba
configuration file.</p>
</dd>
<dt><b><tt class="literal">session</tt></b></dt>
<dd>
<p>Lists clients with open sessions to the server.</p>
</dd>
<dt><b><tt class="literal">session delete NetBIOS_</tt><em class="replaceable">name</em></b></dt>
<dd>
<p>Closes the session to the server from the specified client. A synonym
is <tt class="literal">session</tt> <tt class="literal">close</tt>.</p>
</dd>
<dt><b><tt class="literal">session close</tt></b></dt>
<dd>
<p>A synonym for <tt class="literal">session delete</tt>.</p>
</dd>
<dt><b><tt class="literal">share</tt></b></dt>
<dd>
<p>Lists the shares offered by the server. When a Windows 95/98/Me
server is the target system, it might be necessary to specify the
method as <tt class="literal">rap</tt> for this to work properly.</p>
</dd>
<dt><b><tt class="literal">share add</tt> <em class="replaceable">share_name</em><tt class="literal">=</tt><em class="replaceable">server_path</em></b></dt>
<dd>
<p>Adds a share on the target server. The name of the share and the
folder to be shared are specified by the
<em class="replaceable">share_name</em><tt class="literal">=</tt><em class="replaceable">server_path</em>
argument, with <em class="replaceable">server_path</em> the Windows
directory name, with spaces and other special characters (if any)
quoted and with the backslashes escaped (e.g.,
"<tt class="literal">data=C:\\Documents</tt> <tt class="literal">and</tt>
<tt class="literal">Settings\\jay\\Desktop\\data</tt>"). The
<tt class="literal">-C</tt> <em class="replaceable">comment</em> option
(which can also be specified as <tt class="literal">-
-comment=</tt><em class="replaceable">string</em>) can be used to
define a description for the share. The <tt class="literal">-M</tt>
<em class="replaceable">number</em> option (which can also be specified
as <tt class="literal">--maxusers=</tt><em class="replaceable">number</em>)
can be used to set the maximum number of users that can connect to
the share. The method (<tt class="literal">rap</tt> or
<tt class="literal">rpc</tt>) might need to be specified for this function
to work. The regular folder icon cannot change into a
"shared folder" icon in Windows
Explorer until the display is refreshed.</p>
</dd>
<dt><b><tt class="literal">share delete</tt> <em class="replaceable">share_name</em></b></dt>
<dd>
<p>Deletes a share from the target server. The
<em class="replaceable">share_name</em> argument is simply the name of
the share on the target server, not a UNC. The method
(<tt class="literal">rap</tt> or <tt class="literal">rpc</tt>) might need to be
specified for this function to work. The "shared
folder" icon in Windows Explorer cannot change back
to the regular folder icon until the display is refreshed.</p>
</dd>
<dt><b><tt class="literal">shutdown</tt></b></dt>
<dd>
<p>See the <tt class="literal">rpc shutdown</tt> function.</p>
</dd>
<dt><b><tt class="literal">status</tt></b></dt>
<dd>
<p>See the <tt class="literal">ads status</tt> function.</p>
</dd>
<dt><b><tt class="literal">time</tt></b></dt>
<dd>
<p>Displays the system time—in Unix <em class="emphasis">date</em>
command format—on the target system.</p>
</dd>
<dt><b><tt class="literal">time set</tt></b></dt>
<dd>
<p>Sets the local system's hardware clock using the
time obtained from the operating system.</p>
</dd>
<dt><b><tt class="literal">time system</tt></b></dt>
<dd>
<p>Sets the time on the local system using the time obtained from the
remote system.</p>
</dd>
<dt><b><tt class="literal">time zone</tt></b></dt>
<dd>
<p>Prints the time zone (in hours from GMT) in use on the system.</p>
</dd>
<dt><b><tt class="literal">trustdom add</tt></b></dt>
<dd>
<p>See the <tt class="literal">rpc trustdom add</tt> function.</p>
</dd>
<dt><b><tt class="literal">trustdom establish</tt></b></dt>
<dd>
<p>See the <tt class="literal">rpc trustdom establish</tt> function.</p>
</dd>
<dt><b><tt class="literal">trustdom revoke</tt></b></dt>
<dd>
<p>See the <tt class="literal">rpc trustdom revoke</tt> function.</p>
</dd>
<dt><b><tt class="literal">user</tt></b></dt>
<dd>
<p>Lists user accounts. The method can be specified as
<tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
<tt class="literal">rpc</tt>.</p>
</dd>
<dt><b><tt class="literal">user add</tt> <em class="replaceable">username [password]</em></b></dt>
<dd>
<p>Adds a user account for the user specified by
<em class="replaceable">username</em>. The <tt class="literal">-c</tt>
<em class="replaceable">comment</em> option (which can also be
specified as <tt class="literal">-
-comment=</tt><em class="replaceable">string</em>) can be used to
set a comment for the account. The <tt class="literal">-F</tt>
<em class="replaceable">user_flags</em> option can be used to set flags
(specified in numeric format) for the account. The method can be
specified as <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
<tt class="literal">rpc</tt>.</p>
</dd>
<dt><b><tt class="literal">user delete</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Deletes the specified user's account. The method can
be specified as <tt class="literal">ads</tt>, <tt class="literal">rap</tt>, or
<tt class="literal">rpc</tt>.</p>
</dd>
<dt><b><tt class="literal">user info</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Lists the domain groups to which the specified user belongs. The
method can be specified as <tt class="literal">ads</tt>,
<tt class="literal">rap</tt>, or <tt class="literal">rpc</tt>. <a name="INDEX-10"/></p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-11"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>nmblookup</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">nmblookup</em> program is a client program that
allows command-line access to NetBIOS name service for resolving
NetBIOS computer names into IP addresses. The program works by
broadcasting its queries on the local subnet until a machine with the
specified name responds. You can think of it as a Windows analog of
<em class="emphasis">nslookup</em> or <em class="emphasis">dig</em>. This is
useful for looking up regular computer names, as well as
special-purpose names, such as _ _MSBROWSE_ _ . If you wish to query
for a particular type of NetBIOS name, add the NetBIOS type to the
end of the name, using the format
<em class="replaceable">netbios_name</em><tt class="literal">#<</tt><em class="replaceable">dd</em><tt class="literal">></tt>.</p>
<div class="sect1"><a name="appc-28-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">nmblookup <em class="replaceable">[options] netbios_name</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-29-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-A</tt></b></dt>
<dd>
<p>Interprets <em class="replaceable">netbios_name</em> as an IP address
and does a node status query on it.</p>
</dd>
<dt><b><tt class="literal">-B</tt> <em class="replaceable">broadcast_address</em></b></dt>
<dd>
<p>Sends the query to the given broadcast address. The default is to
send the query to the broadcast address of the primary network
interface.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Debug level 0 logs only the most important messages.
Level 1 is normal; levels 3 and above are primarily used by
developers for debugging the <em class="emphasis">nmblookup</em> program
itself and slow the program considerably.</p>
</dd>
<dt><b><tt class="literal">-f</tt></b></dt>
<dd>
<p>Prints the flags in the packet headers.</p>
</dd>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints command-line usage information for the program.</p>
</dd>
<dt><b><tt class="literal">-i</tt> <em class="replaceable">scope</em></b></dt>
<dd>
<p>Sets a NetBIOS scope identifier. NetBIOS scope is a rarely used
precursor to workgroups.</p>
</dd>
<dt><b><tt class="literal">-M</tt></b></dt>
<dd>
<p>Searches for a local master browser by looking up
<em class="replaceable">netbios_name</em><tt class="literal"><1d></tt>.
If <em class="replaceable">netbios_name</em> is specified as a dash
(<tt class="literal">-</tt>), a lookup is done on the special name _
_MSBROWSE_ _ .</p>
</dd>
<dt><b><tt class="literal">-R</tt></b></dt>
<dd>
<p>Sets the "recursion desired" bit in
the packet. This causes the system that responds to try a WINS lookup
and return the address and any other information the WINS server has
saved.</p>
</dd>
<dt><b><tt class="literal">-r</tt></b></dt>
<dd>
<p>Uses the <tt class="literal">root</tt> port of 137. This option exists as a
bug workaround for Windows 95. This option might require the user to
be superuser.</p>
</dd>
<dt><b><tt class="literal">-S</tt></b></dt>
<dd>
<p>Performs a node status query once the name query has returned an IP
address. This returns all the resource types that the system knows
about, including their numeric attributes. For example:</p>
<blockquote><pre class="code">$ <tt class="userinput"><b>nmblookup -S toltec</b></tt>
querying toltec on 172.16.1.255
172.16.1.1 toltec<00>
Looking up status of 172.16.1.1
TOLTEC <00> - M <ACTIVE>
TOLTEC <03> - M <ACTIVE>
TOLTEC <20> - M <ACTIVE>
..__MSBROWSE__. <01> - <GROUP> M <ACTIVE>
METRAN <00> - <GROUP> M <ACTIVE>
METRAN <1b> - M <ACTIVE>
METRAN <1c> - <GROUP> M <ACTIVE>
METRAN <1d> - M <ACTIVE>
METRAN <1e> - <GROUP> M <ACTIVE></pre></blockquote>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">configuration_ file</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file. Although the
file defaults to <em class="filename">/usr/local/samba/lib/smb.conf</em>,
you can override it here on the command line. Normally used for
debugging.</p>
</dd>
<dt><b><tt class="literal">-T</tt></b></dt>
<dd>
<p>Translates IP addresses into resolved names.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">unicast_address</em></b></dt>
<dd>
<p>Performs a unicast query to the specified address. Used with
<tt class="literal">-R</tt> to query WINS servers.</p>
</dd>
</dl>
<p>Note that <em class="emphasis">nmblookup</em> has no option for setting
the workgroup. You can get around this by putting
<tt class="literal">workgroup</tt> <tt class="literal">=</tt>
<em class="replaceable">workgroup_name</em> in a file and passing it to
<em class="emphasis">nmblookup</em> with the
<tt class="literal">-s</tt> option.</p>
</div>
</div>
<a name="INDEX-12"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>pdbedit</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program, new to Samba 3.0, can be used to manage accounts that
are held in a SAM database. The implementation of the database can be
any of the types supported by Samba, including the
<em class="filename">smbpasswd</em> file, LDAP, NIS+ and the
<em class="filename">tdb</em> database library. The user must be the
superuser to use this tool.</p>
<div class="sect1"><a name="appc-31-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">pdbedit <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-32-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-a</tt></b></dt>
<dd>
<p>Adds the user specified by the <tt class="literal">-u</tt> option to the
SAM database. The command issues a prompt for the
user's password.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">drive_letter</em></b></dt>
<dd>
<p>Sets the Windows drive letter to which to map the
user's home directory. The drive letter should be
specified as a letter followed by a colon—e.g.,
<tt class="literal">H</tt>:.</p>
</dd>
<dt><b><tt class="literal">-D</tt> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Debug level 0 logs only the most important messages.
Level 1 is normal, and levels 3 and above are primarily for
debugging.</p>
</dd>
<dt><b><tt class="literal">-e</tt> <em class="replaceable">pwdb_backend</em></b></dt>
<dd>
<p>Exports the user account database to another format, written to the
specified location. Used for migrating from one type of account
database to another. The <em class="replaceable">pwdb_backend</em>
argument is specified in the format of a database type, followed by a
colon, then the location of the database. For example, to export the
existing account database to an <em class="filename">smbpasswd</em>
database in the file
<em class="filename">/usr/local/samba/private/smbpw</em>,
<em class="replaceable">pwdb_backend</em> would be specified as
<tt class="literal">smbpasswd:/usr/local/samba/private/smbpw</tt>. The
allowable database types are <tt class="literal">smbpasswd</tt>,
<tt class="literal">smbpasswd nua</tt>, <tt class="literal">tdbsam</tt>,
<tt class="literal">tdbsam nua</tt>, <tt class="literal">ldapsam</tt>,
<tt class="literal">ldapsam_nua</tt>, and <tt class="literal">plugin</tt>.</p>
</dd>
<dt><b><tt class="literal">-f</tt> <em class="replaceable">full_name</em></b></dt>
<dd>
<p>Sets the full name of the user specified with the
<tt class="literal">-u</tt> option.</p>
</dd>
<dt><b><tt class="literal">-h</tt> <em class="replaceable">unc</em></b></dt>
<dd>
<p>Sets the home directory path (as a UNC) for the user specified with
the <tt class="literal">-u</tt> option.</p>
</dd>
<dt><b><tt class="literal">-i</tt> <em class="replaceable">pwdb_backend</em></b></dt>
<dd>
<p>Specifies a password database backend from which to retrieve account
information, overriding the one specified by the <tt class="literal">passdb
backend</tt> parameter in the Samba configuration file. This,
along with the <tt class="literal">-e</tt> option, is useful for migrating
user accounts from one type of account database to another. See the
<tt class="literal">-e</tt> option regarding how to specify the
<em class="replaceable">pwdb_backend</em> argument.</p>
</dd>
<dt><b><tt class="literal">-l</tt></b></dt>
<dd>
<p>Lists the user accounts in the database. See also the
<tt class="literal">-v</tt> option.</p>
</dd>
<dt><b><tt class="literal">-m</tt></b></dt>
<dd>
<p>Indicates that the account is a computer account rather than a user
account. Used only with the <tt class="literal">-a</tt> option when
creating the account. In this case, the <tt class="literal">-u</tt> option
specifies the computer name rather than a username.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">unc</em></b></dt>
<dd>
<p>Sets the directory in which the user's profile is
kept. The directory is specified as a UNC.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">unc</em></b></dt>
<dd>
<p>Specifies the UNC of the user's logon script.</p>
</dd>
<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Specifies the username of the account to add (with the
<tt class="literal">-a</tt> option), delete (with the <tt class="literal">-x</tt>
option), or modify.</p>
</dd>
<dt><b><tt class="literal">-v</tt></b></dt>
<dd>
<p>Selects verbose mode when listing accounts with the
<tt class="literal">-l</tt> option. The account fields will be printed.</p>
</dd>
<dt><b><tt class="literal">-w</tt></b></dt>
<dd>
<p>Selects the <tt class="literal">smbpasswd</tt> listing mode, for use with
the <tt class="literal">-l</tt> option, which prints information in the
same format as it would appear in an <em class="filename">smbpasswd</em>
file.</p>
</dd>
<dt><b><tt class="literal">-x</tt></b></dt>
<dd>
<p>Deletes the user (specified with the <tt class="literal">-u</tt> option)
from the account database.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-13"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>rpcclient</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a program for issuing administrative commands that are
implemented using Microsoft RPCs. It provides access to the RPCs that
Windows administrative GUIs use for system management. The
<em class="emphasis">rpcclient</em> command is mainly for use by advanced
users who understand the RPCs. More information on these can be found
in Microsoft's Platform Software Development Kit
(SDK), available for download from the Microsoft web site at
<a href="http://www.microsoft.com">http://www.microsoft.com</a>.</p><p>You can run a single <em class="emphasis">rpcclient</em> command by using
the <tt class="literal">-c command string</tt> option, or interactively
with <em class="emphasis">rpcclient</em> prompting for commands.</p>
<div class="sect1"><a name="appc-34-fm2xml"/>
<h4 class="refsect1">Command Synopsis</h4>
<p>rpcclient <em class="replaceable">server [options]</em></p>
</div>
<div class="sect1"><a name="appc-35-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-A</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies a file from which to read the authentication values used in
the connection. The format of the file is as follows:</p>
<blockquote><pre class="code">username = <em class="replaceable">value</em>
password = <em class="replaceable">value</em>
domain = <em class="replaceable">value</em></pre></blockquote>
<p>This option is used to avoid password prompts or to have the password
appear in plain text inside scripts. The permissions on the file
should be very restrictive (0600, for example) to prevent access from
unwanted users.</p>
</dd>
<dt><b><tt class="literal">-c</tt> <em class="replaceable">command_string</em></b></dt>
<dd>
<p>Executes a sequence of semicolon-separated commands. Commands are
listed in the following section.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0 to 10. Specifying the value on the command line overrides the
value specified in the <em class="filename">smb.conf</em> file. Debug
level 0 logs only the most important messages; level 1 is normal;
levels 3 and above are primarily for debugging and slow the program
considerably.</p>
</dd>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints a summary of options.</p>
</dd>
<dt><b><tt class="literal">-l</tt> <em class="replaceable">logbasename</em></b></dt>
<dd>
<p>Sets the filename for log/debug files. The extension
<em class="filename">.client</em> is appended to the filename.</p>
</dd>
<dt><b><tt class="literal">-N</tt></b></dt>
<dd>
<p>Does not prompt for a password. This is used when Samba is configured
for share-mode security and a service with no password is being
accessed.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file, which by
default is usually
<em class="filename">/usr/local/samba/lib/smb.conf</em>.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
<dd>
<p>Sets the SMB username or username and password to use. Be careful
when specifying the password with
<tt class="literal">%</tt><em class="replaceable">password</em>; this is a
major security risk. If
<tt class="literal">%</tt><em class="replaceable">password</em> is not
specified, the user will be prompted for the password, which will not
be echoed. Normally the user is set from the USER or LOGNAME
environment variable. The <tt class="literal">-U</tt> option by itself
means to use the guest account. See also <tt class="literal">-A</tt>.</p>
</dd>
<dt><b><tt class="literal">-W</tt> <em class="replaceable">domain</em></b></dt>
<dd>
<p>Sets the domain, overriding the <tt class="literal">workgroup</tt>
parameter in the Samba configuration file. If the domain is the
server's NetBIOS name, it causes the client to log
on using the server's local SAM database rather than
the SAM of the domain.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-14"/><a name="INDEX-15"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>rpcclient commands</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>Aside from a few miscellaneous commands, the
<em class="emphasis">rpclient</em> commands fall into three groups:
LSARPC, SAMR, and SPOOLSS. The function names mentioned in some of
the commands are those documented in the Microsoft Platform SDK.</p>
<div class="sect1"><a name="appc-37-fm2xml"/>
<h4 class="refsect1">General commands</h4>
<dl>
<dt><b><tt class="literal">debuglevel</tt> <em class="replaceable">level</em></b></dt>
<dd>
<p>Sets the debugging level to <em class="replaceable">level</em>. With no
argument, the current debugging level is printed.</p>
</dd>
<dt><b><tt class="literal">help</tt></b></dt>
<dd>
<p>Prints help on the commands.</p>
</dd>
<dt><b><tt class="literal">quit</tt></b></dt>
<dd>
<p>Exits <em class="emphasis">rpcclient</em>. A synonym is
<tt class="literal">exit</tt>.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-38-fm2xml"/>
<h4 class="refsect1">Local Security Authority Remote Procedure Calls (LSARPC) commands</h4>
<dl>
<dt><b><tt class="literal">enumprivs</tt></b></dt>
<dd>
<p>Lists the types of privileges known to this domain.</p>
</dd>
<dt><b><tt class="literal">enumtrust</tt></b></dt>
<dd>
<p>Lists the domains trusted by this domain.</p>
</dd>
<dt><b><tt class="literal">getdispname</tt> <em class="replaceable">priv_name</em></b></dt>
<dd>
<p>Prints information on the privilege named
<em class="replaceable">priv_name</em>.</p>
</dd>
<dt><b><tt class="literal">lookupsids</tt> <em class="replaceable">name</em></b></dt>
<dd>
<p>Finds a name that corresponds to a security identifier (SID).</p>
</dd>
<dt><b><tt class="literal">lookupnames</tt> <em class="replaceable">sid</em></b></dt>
<dd>
<p>Finds the SID for one or more names.</p>
</dd>
<dt><b><tt class="literal">lsaquery</tt></b></dt>
<dd>
<p>Queries the LSA object.</p>
</dd>
<dt><b><tt class="literal">lsaenumsid</tt></b></dt>
<dd>
<p>Lists SIDs for the local LSA.</p>
</dd>
<dt><b><tt class="literal">lsaquerysecobj</tt></b></dt>
<dd>
<p>Prints information on security objects for the LSA.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-39-fm2xml"/>
<h4 class="refsect1">Security Access Manager RPC (SAMR) commands</h4>
<dl>
<dt><b><tt class="literal">createdomuser</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Adds a new user in the domain.</p>
</dd>
<dt><b><tt class="literal">deletedomuser</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Removes a user from the domain.</p>
</dd>
<dt><b><tt class="literal">enumalsgroups</tt> <em class="replaceable">type</em></b></dt>
<dd>
<p>Lists alias groups in the domain, along with their group RIDs. The
<em class="replaceable">type</em> argument can be either
<tt class="literal">builtin</tt>, to list Windows built-in groups such as
<tt class="literal">Administrators</tt> and <tt class="literal">Power</tt>
<tt class="literal">Users</tt>, or <tt class="literal">domain</tt>, to list
groups in the domain. See also the
<em class="emphasis">queryuseraliases</em> command.</p>
</dd>
<dt><b><tt class="literal">enumdomgroups</tt></b></dt>
<dd>
<p>Lists the groups in the domain, along with their group RIDs.</p>
</dd>
<dt><b><tt class="literal">queryaliasmem</tt> <em class="replaceable">user_rid</em></b></dt>
<dd>
<p>Prints information regarding alias membership. See also the
<em class="emphasis">queryuseraliases</em> command.</p>
</dd>
<dt><b><tt class="literal">querydispinfo</tt></b></dt>
<dd>
<p>Prints out the account database. The information printed includes the
RID, username, and full name of each user. The RID is printed in
hexadecimal notation and can be used in this form for commands that
take a RID as an argument.</p>
</dd>
<dt><b><tt class="literal">querydominfo</tt></b></dt>
<dd>
<p>Prints information regarding the domain. This includes the name of
the domain, as well as the number of users, groups, and aliases.</p>
</dd>
<dt><b><tt class="literal">querygroup</tt> <em class="replaceable">group_rid</em></b></dt>
<dd>
<p>Given a group RID, prints the group name, description, number of
members, and group description.</p>
</dd>
<dt><b><tt class="literal">queryuser</tt> <em class="replaceable">user_rid</em></b></dt>
<dd>
<p>Given a user RID, prints the corresponding username, full name, and
other information pertaining to the user.</p>
</dd>
<dt><b><tt class="literal">queryuseraliases</tt> <em class="replaceable">type</em> <em class="replaceable">user_rid</em></b></dt>
<dd>
<p>Prints aliases for the user. The <em class="replaceable">type</em>
argument can be either <tt class="literal">builtin</tt> or
<tt class="literal">domain</tt>. Aliases are used with the Windows
messaging service and act like usernames, but they can be attached to
a computer rather than a user. This allows messages intended for a
user to be sent to a computer on which the user is either not logged
on, or logged on under another username.</p>
</dd>
<dt><b><tt class="literal">queryusergroups</tt> <em class="replaceable">user_rid</em></b></dt>
<dd>
<p>Prints information on each group inhabited by the user.</p>
</dd>
<dt><b><tt class="literal">querygroupmem</tt> <em class="replaceable">group_rid</em></b></dt>
<dd>
<p>Prints the RID and attributes for each member of the group.</p>
</dd>
<dt><b><tt class="literal">samlookupnames</tt> <em class="replaceable">type username</em></b></dt>
<dd>
<p>Looks up the <em class="replaceable">username</em> in the SAM database
and prints its associated RID. The <em class="replaceable">type</em>
argument can be either <tt class="literal">builtin</tt>, to look up
built-in Windows usernames, or <tt class="literal">domain</tt>, to look up
names in the domain.</p>
</dd>
<dt><b><tt class="literal">samlookuprids</tt> <em class="replaceable">type rid</em></b></dt>
<dd>
<p>Looks up <em class="replaceable">rid</em> in the SAM database and
prints its associated group or username. The
<em class="replaceable">type</em> argument can be either
<tt class="literal">builtin</tt>, to look up built-in Windows usernames, or
<tt class="literal">domain</tt>, to look up names in the domain. The RID
argument can be given in either 0xDDD hexadecimal notation or
decimal.</p>
</dd>
<dt><b><tt class="literal">samquerysecobj</tt></b></dt>
<dd>
<p>Prints information on security objects (such as ACLs) in the SAM
database.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-40-fm2xml"/>
<h4 class="refsect1">Windows NT/2000/XP Printing Services (SPOOLSS) commands</h4>
<dl>
<dt><b><tt class="literal">adddriver</tt> <em class="replaceable">arch config_file</em> </b></dt>
<dd>
<p>Adds a printer driver to the server. The driver files must already
exist in the directory returned by <em class="emphasis">getdriverdir</em>.
The <em class="replaceable">arch</em> argument can be one of
<tt class="literal">Windows 4.0</tt> for Windows 95/98/Me, or
<tt class="literal">Windows NT x86</tt>, <tt class="literal">Windows NT
PowerPC</tt>, <tt class="literal">Windows Alpha_AXP</tt>, and
<tt class="literal">Windows NT R4000</tt>. Others might be introduced in
the future.</p>
<p>The <em class="replaceable">config_file</em> should contain:</p>
<blockquote><pre class="code">Long Printer Name:\
Driver File Name:\
Data File Name:\
Config File Name:\
Help File Name:\
NULL:\
Default Data Type:\</pre></blockquote>
<p>followed by a comma-separated list of files. Any empty fields should
contain the string <tt class="literal">NULL</tt>.</p>
</dd>
<dt><b><tt class="literal">addprinter</tt> <em class="replaceable">printername sharename drivername port</em> </b></dt>
<dd>
<p>Adds a printer on the remote server as
<em class="replaceable">sharename</em>. The printer driver must already
be installed on the server with <em class="emphasis">adddriver</em>, and
the port must be a valid port name returned by
<em class="emphasis">enumports</em>.</p>
</dd>
<dt><b><tt class="literal">deldriver</tt> <em class="replaceable">drivername</em></b></dt>
<dd>
<p>Deletes a printer driver (for all architectures) from the
server's list of printer drivers.</p>
</dd>
<dt><b><tt class="literal">enumports</tt> <em class="replaceable">[level]</em></b></dt>
<dd>
<p>Prints information regarding the printer ports on the server. The
<em class="replaceable">level</em> argument can be <tt class="literal">1</tt>
or <tt class="literal">2</tt>. Level 1 is the default and prints out only
the Port Name. Information level 2 is the Port Name, Monitor Name,
Description, and Port Type.</p>
</dd>
<dt><b><tt class="literal">enumdrivers</tt> <em class="replaceable">[level]</em> </b></dt>
<dd>
<p>Lists all the printer drivers on the system. The
<em class="replaceable">level</em> argument specifies the information
level. Level 1 is the default and prints the Driver Name(s). Level 2
prints the Version, Driver Name, Architecture, Driver Path, Data
File, and Config File. Level 3 prints the contents of Level 2, plus
the Help File, one or more Dependent Files, Monitor Name, and Default
Data Type.</p>
</dd>
<dt><b><tt class="literal">enumprinters</tt> <em class="replaceable">[level]</em></b></dt>
<dd>
<p>Lists all installed printers, regardless of whether they are shared.
The <em class="replaceable">level</em> argument specifies the
information level. Level 1 is the default, and prints Flags, Name,
Description, and Comment. Level 2 prints the Server Name, Printer
Name, Share Name, Port Name, Driver Name, Comment, Location,
Separator File, Print Processor, Data Type, Parameters, Attributes,
Priority, Default Priority, Start Time, Until Time, Status, Current
Jobs, Average PPM (pages per minute), and a Security Descriptor.</p>
</dd>
<dt><b><tt class="literal">getdriver</tt> <em class="replaceable">[level] printername</em></b></dt>
<dd>
<p>Prints the printer driver information for the given printer. The
<em class="replaceable">level</em> argument specifies the information
level.</p>
<p>Level 1 is the default, and prints the Driver Name. Level 2 prints
the Version, Driver Name, Architecture, Driver Path, Data File, and
Config File. Level 3 prints the contents of level 2, plus the Help
File, one or more Dependent Files, Monitor Name, and Default Data
Type.</p>
</dd>
<dt><b><tt class="literal">getdriverdir</tt> <em class="replaceable">arch</em></b></dt>
<dd>
<p>Retrieves the share name and directory for storing printer driver
files for a given architecture. Possible values for
<em class="replaceable">arch</em> are "<tt class="literal">Windows</tt>
<tt class="literal">4.0</tt>" for Windows 95/98/Me,
"<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
<tt class="literal">x86</tt>" for Windows NT on Intel,
"<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
<tt class="literal">PowerPC</tt>" for Windows NT on PowerPC,
"<tt class="literal">Windows</tt> <tt class="literal">Alpha</tt>
<tt class="literal">AXP</tt>" for Windows NT on Alpha, and
"<tt class="literal">Windows</tt> <tt class="literal">NT</tt>
<tt class="literal">R4000</tt>" for Windows NT on MIPS. Include the quote
marks in the command.</p>
</dd>
<dt><b><tt class="literal">getprinter</tt> <em class="replaceable">printername</em></b></dt>
<dd>
<p>Prints the current printer information. The
<em class="replaceable">level</em> argument specifies the information
level.</p>
</dd>
<dt><b><tt class="literal">openprinter</tt> <em class="replaceable">printername</em></b></dt>
<dd>
<p>Attempts to open and close a specified printer and reports whether it
was successful.</p>
</dd>
<dt><b><tt class="literal">setdriver</tt> <em class="replaceable">printername drivername</em></b></dt>
<dd>
<p>Unconditionally updates the printer driver used by an installed
printer. Both the printer and printer driver must already be
correctly installed on the print server.</p>
</dd>
<dt><b><tt class="literal">setprinter</tt> <em class="replaceable">printername comment</em></b></dt>
<dd>
<p>Assigns a comment string to a printer.<a name="INDEX-15"/></p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-16"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbcacls</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program provides a way of modifying Windows NT ACLs on files and
directories shared by the Samba server.</p>
<div class="sect1"><a name="appc-42-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbcacls //<em class="replaceable">server</em>/<em class="replaceable">share filename</em> <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-43-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-A</tt> <em class="replaceable">acls</em></b></dt>
<dd>
<p>Adds one or more ACLs to the file or directory. Any ACLs already
existing for the file or directory are unchanged.</p>
</dd>
<dt><b><tt class="literal">-M</tt> <em class="replaceable">acls</em></b></dt>
<dd>
<p>Modifies the <em class="replaceable">mask</em> of the ACLs specified.
Refer to the following section, "Specifying
ACLs," for details.</p>
</dd>
<dt><b><tt class="literal">-D</tt> <em class="replaceable">acls</em></b></dt>
<dd>
<p>Deletes the specified ACLs.</p>
</dd>
<dt><b><tt class="literal">-S</tt> <em class="replaceable">acls</em></b></dt>
<dd>
<p>Sets the specified ACLs, deleting any ACLs previously set on the file
or directory. The ACLs must contain at least a revision, type, owner,
and group.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Sets the username used to connect to the specified service. The user
is prompted for a password unless the argument is specified as
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>.
(Specifying the password on the command line is a security risk.) If
<tt class="literal">-U</tt>
<em class="replaceable">domain</em><tt class="literal">\\</tt><em class="replaceable">username</em>
is specified, the specified domain or workgroup will be used in place
of the one specified in the <em class="filename">smb.conf</em> file.</p>
</dd>
<dt><b><tt class="literal">-C</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Changes the owner of the file or directory. This is a shortcut for
<tt class="literal">-M</tt>
<tt class="literal">OWNER</tt>:<em class="replaceable">username</em>. The
<em class="replaceable">username</em> argument can be given as a
username or a SID in the form
<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
</dd>
<dt><b><tt class="literal">-G</tt> <em class="replaceable">groupname</em></b></dt>
<dd>
<p>Changes the group of the file or directory. This is a shortcut for
<tt class="literal">-M</tt>
<tt class="literal">GROUP</tt>:<em class="replaceable">groupname</em>. The
<em class="replaceable">groupname</em> argument can be given as a group
name or a SID in the form
<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
</dd>
<dt><b><tt class="literal">-n</tt></b></dt>
<dd>
<p>Causes all ACL information to be displayed in numeric format rather
than in readable strings.</p>
</dd>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints a help message.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-44-fm2xml"/>
<h4 class="refsect1">Specifying ACLs</h4>
<p>In the previous options, the same format is always used when
specifying ACLs. An ACL is made up of one or more Access Control
Entries (ACEs), separated by either commas or escaped newlines. An
ACE can be one of the following:</p>
<blockquote class="simplelist">
<p><tt class="literal">REVISION</tt>:<em class="replaceable">revision_number</em></p>
<p><tt class="literal">OWNER</tt>:<em class="replaceable">username_or_SID</em></p>
<p><tt class="literal">GROUP</tt>:<em class="replaceable">group_name_or_SID</em></p>
<p><tt class="literal">ACL</tt>:<em class="replaceable">name_or_SID</em>:<em class="replaceable">type</em>/<em class="replaceable">flags</em>/<em class="replaceable">mask</em></p>
</blockquote>
<p>The <em class="replaceable">revision_number</em> should always be 1.
The <tt class="literal">OWNER</tt> and <tt class="literal">GROUP</tt> entries can
be used to set the owner and group for the file or directory. The
names can be the textual ones or SIDs in the form
<tt class="literal">S-1-</tt><em class="replaceable">N</em><tt class="literal">-</tt><em class="replaceable">N</em><tt class="literal">-</tt><em class="replaceable">D</em><tt class="literal">-</tt><em class="replaceable">D-D-R</em>.</p>
<p>The <tt class="literal">ACL</tt> entry specifies what access rights to
apply to the file or directory. The
<em class="replaceable">name_or_SID</em> field specifies to which user
or group the permissions apply and can be supplied either as a
textual name or a SID. An ACE can be used to either allow or deny
access. The <em class="replaceable">type</em> field is set to
<tt class="literal">1</tt> to specify a permission to be allowed or
<tt class="literal">0</tt> for specifying a permission to deny. The
<em class="replaceable">mask</em> field is the name of the permission
and is one of the following:</p>
<dl>
<dt><b><tt class="literal">R</tt></b></dt>
<dd>
<p>Read access.</p>
</dd>
<dt><b><tt class="literal">W</tt></b></dt>
<dd>
<p>Write access.</p>
</dd>
<dt><b><tt class="literal">X</tt></b></dt>
<dd>
<p>Execute permission.</p>
</dd>
<dt><b><tt class="literal">D</tt></b></dt>
<dd>
<p>Permission to delete.</p>
</dd>
<dt><b><tt class="literal">P</tt></b></dt>
<dd>
<p>Change permissions on the object.</p>
</dd>
<dt><b><tt class="literal">O</tt></b></dt>
<dd>
<p>Take ownership.</p>
</dd>
</dl>
<p>The following combined permissions can also be specified:</p>
<dl>
<dt><b><tt class="literal">READ</tt></b></dt>
<dd>
<p>Equivalent to RX permissions</p>
</dd>
<dt><b><tt class="literal">CHANGE</tt></b></dt>
<dd>
<p>Equivalent to RWXD permissions</p>
</dd>
<dt><b><tt class="literal">FULL</tt></b></dt>
<dd>
<p>Equivalent to RWXDPO permissions</p>
</dd>
</dl>
<p>The <em class="replaceable">flags</em> field is for specifying how
objects in directories are to inherit their default permissions from
their parent directory. For files, <em class="replaceable">flags</em>
is normally set to <tt class="literal">0</tt>. For directories,
<em class="replaceable">flags</em> is usually set to either
<tt class="literal">9</tt> or <tt class="literal">2</tt>.</p>
</div>
</div>
<a name="INDEX-17"/><a name="INDEX-18"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbclient</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbclient</em> program is the
"Swiss army knife" of the Samba
suite. Initially developed as a testing tool, it has become a command
shell capable of acting as a general-purpose Unix client, with a
command set very similar to that of <em class="emphasis">ftp</em>. It
offers the following set of functions:</p><ul><li>
<p>Interactive file transfer, similar to <em class="emphasis">ftp</em></p>
</li>
<li>
<p>Interactive printing to shared SMB printers</p>
</li>
<li>
<p>Interactive tar format archiving</p>
</li>
<li>
<p>Sending messages on the SMB network</p>
</li>
<li>
<p>Batch mode tar format archiving</p>
</li>
<li>
<p>"What services do you have?"
querying</p>
</li>
<li>
<p>Debugging</p>
</li></ul>
<div class="sect1"><a name="appc-45-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbclient //<em class="replaceable">server</em>/<em class="replaceable">share</em> <em class="replaceable">[ password] [options]</em></pre></blockquote>
<p>It is possible to run <em class="emphasis">smbclient</em>
noninteractively, for use in scripts, by specifying the
<tt class="literal">-c</tt> option along with a list of commands to
execute. Otherwise, <em class="emphasis">smbclient</em> runs in
interactive mode, prompting for commands such as this:</p>
<blockquote><pre class="code">smb:\></pre></blockquote>
<p>The backslash in the prompt is replaced by the current directory
within the share as you change your working directory with
<em class="emphasis">smbclient</em>'s
<em class="emphasis">cd</em> command.</p>
</div>
<div class="sect1"><a name="appc-46-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-A</tt> <em class="replaceable">authfile</em></b></dt>
<dd>
<p>Specifies a file from which to read the username and password used
for the connection. The format of the file is as follows:</p>
<blockquote><pre class="code">username = <em class="replaceable">value</em>
password = <em class="replaceable">value</em>
domain = <em class="replaceable">value</em></pre></blockquote>
<p>This is to avoid having the password prompted for or have it appear
in plain text in scripts. The permissions on the file should be very
restrictive (0600, for example) to prevent access by unwanted users.</p>
</dd>
<dt><b><tt class="literal">-b</tt> <em class="replaceable">buffer_size</em></b></dt>
<dd>
<p>Sets the size of the buffer used when transferring files. It defaults
to 65520 bytes and can be changed as a tuning measure. Generally it
should be quite large or set to match the size of the buffer on the
remote system. It can be set smaller to work around Windows bugs:
some Windows 98 systems work best with a buffer size of 1200.</p>
</dd>
<dt><b><tt class="literal">-B</tt> <em class="replaceable">IP_addr</em></b></dt>
<dd>
<p>Sets the broadcast address.</p>
</dd>
<dt><b><tt class="literal">-c</tt> <em class="replaceable">command_string</em> </b></dt>
<dd>
<p>Passes a command string to the <em class="emphasis">smbclient</em> command
interpreter. The argument consists of a semicolon-separated list of
commands to be executed.</p>
</dd>
<dt><b><em class="emphasis">-d</em> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (logging) level, from 0 to 10, with A for all.
Overrides the value in <em class="filename">smb.conf</em>. Debug level 0
logs only the most important messages; level 1 is normal; debug
levels 3 and above are for debugging and slow
<em class="emphasis">smbclient</em> considerably.</p>
</dd>
<dt><b><tt class="literal">-D</tt> <em class="replaceable">init_dir</em></b></dt>
<dd>
<p>Upon starting up, causes <em class="emphasis">smbclient</em> to change its
working directory to <em class="replaceable">init_dir</em> on the
remote host.</p>
</dd>
<dt><b><tt class="literal">-E</tt></b></dt>
<dd>
<p>Sends output from commands to <em class="emphasis">stderr</em> instead of
<em class="emphasis">stdout</em>.</p>
</dd>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints the command-line help information (usage) for
<em class="emphasis">smbclient</em>.</p>
</dd>
<dt><b><tt class="literal">-I</tt> <em class="replaceable">IP_address</em></b></dt>
<dd>
<p>Sets the IP address of the server to which the client connects.</p>
</dd>
<dt><b><tt class="literal">-i</tt> <em class="replaceable">scope</em></b></dt>
<dd>
<p>Sets a NetBIOS scope identifier.</p>
</dd>
<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_ file</em></b></dt>
<dd>
<p>Sends the log messages to <em class="replaceable">log_file</em> rather
than to the log file specified in the Samba configuration file or the
compiled-in default.</p>
</dd>
<dt><b><tt class="literal">-L</tt> <em class="replaceable">server</em></b></dt>
<dd>
<p>Lists services (shares) offered by the server. This can be used as a
quick way to test an SMB server to see if it is working. If there is
a name-service problem, use the <tt class="literal">-I</tt> option to
specify the server.</p>
</dd>
<dt><b><tt class="literal">-M</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
<dd>
<p>Allows you to send messages using the Windows messaging protocol.
Once a connection is established, you can type your message, pressing
Ctrl-D to end. The <tt class="literal">-U</tt> and <tt class="literal">-I</tt>
options can be used to control the
"From" and
"To" parts of the message.</p>
</dd>
<dt><b><tt class="literal">-N</tt></b></dt>
<dd>
<p>Suppresses the password prompt. Useful when using share mode security
and accessing a service that has no password.</p>
</dd>
<dt><b><tt class="literal">-n</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
<dd>
<p>Allows you to override the NetBIOS name by which
<em class="emphasis">smbclient</em> will advertise itself.</p>
</dd>
<dt><b><tt class="literal">-O</tt> <em class="replaceable">socket_options</em></b></dt>
<dd>
<p>Sets the TCP/IP socket options using the same parameters as the
<tt class="literal">socket options</tt> configuration option. Often used
for performance tuning and testing.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">port_number</em></b></dt>
<dd>
<p>Sets the port number with which <em class="emphasis">smbclient</em> will
connect.</p>
</dd>
<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order</em></b></dt>
<dd>
<p>Sets the resolve order of the name servers. This option is similar to
the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
option and can take any of the four parameters
<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
If more than one is specified, the argument is specified as a
space-separated list. This option can be used to test name service by
specifying only the name service to be tested.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file. Used for
debugging.</p>
</dd>
<dt><b><tt class="literal">-t</tt> <em class="replaceable">terminal_code</em></b></dt>
<dd>
<p>Sets the terminal code for Asian languages.</p>
</dd>
<dt><b><tt class="literal">-T</tt> <em class="replaceable">command_string tarfile</em></b></dt>
<dd>
<p>Runs the tar archiver, which is <em class="emphasis">gtar</em> compatible.
The tar file that is written to or read from is specified by
<em class="replaceable">tarfile</em>. The two main commands are
<tt class="literal">c</tt> (create) and <tt class="literal">x</tt> (extract),
which can be followed by any of these:</p>
<dl>
<dt><b><tt class="literal">a</tt></b></dt>
<dd>
<p>Resets the archive attribute on files after they have been saved. See
also the <tt class="literal">g</tt> option.</p>
</dd>
<dt><b><tt class="literal">b</tt> <em class="replaceable">size</em></b></dt>
<dd>
<p>Sets the block size for writing the tar file, in 512-byte units.</p>
</dd>
<dt><b><tt class="literal">g</tt></b></dt>
<dd>
<p>Backs up only files that have their archive bit set. See also the
<tt class="literal">a</tt> option.</p>
</dd>
<dt><b><tt class="literal">I</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Includes files and directories. This is the default, so specifying
this is redundant. To perform pattern matching, see also the
<tt class="literal">r</tt> option.</p>
</dd>
<dt><b><tt class="literal">N</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Backs up only those files newer than <em class="replaceable">file</em>.</p>
</dd>
<dt><b><tt class="literal">q</tt></b></dt>
<dd>
<p>Suppresses diagnostics.</p>
</dd>
<dt><b><tt class="literal">r</tt></b></dt>
<dd>
<p>Performs regular expression matching, which can be used along with
the <tt class="literal">I</tt> or <tt class="literal">E</tt> option to include or
exclude files.</p>
</dd>
<dt><b><tt class="literal">X</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Excludes files and directories.</p>
</dd>
</dl>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Sets the username and, optionally, the password used for
authentication when connecting to the share.</p>
</dd>
<dt><b><tt class="literal">-W</tt> <em class="replaceable">workgroup</em></b></dt>
<dd>
<p>Specifies the workgroup/domain in which
<em class="emphasis">smbclient</em> will claim to be a member.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-47-fm2xml"/>
<h4 class="refsect1">smbclient commands</h4>
<dl>
<dt><b><tt class="literal">help</tt> <em class="replaceable">[smbclient_command]</em></b></dt>
<dd>
<p>With no command specified, prints a list of available commands. If a
command is specified as an argument, a brief help message will be
printed for it.</p>
</dd>
<dt><b><tt class="literal">!</tt> <em class="replaceable">[shell_command]</em></b></dt>
<dd>
<p>Shell escape. With no command specified, runs a Unix shell. If a
command is specified, runs the command in a Unix shell.</p>
</dd>
<dt><b><tt class="literal">altname</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Causes <em class="emphasis">smbclient</em> to request from the server and
then print the old-style, 8.3-format filename for the specified file.</p>
</dd>
<dt><b><tt class="literal">cancel</tt> <em class="replaceable">print_jobid [...]</em></b></dt>
<dd>
<p>Causes <em class="emphasis">smbclient</em> to request the server to cancel
one or more print jobs, as specified by the numeric job IDs provided
as arguments. See also the <em class="emphasis">queue</em> command, which
prints job IDs.</p>
</dd>
<dt><b><tt class="literal">chmod</tt> <em class="replaceable">filename octal_mode</em></b></dt>
<dd>
<p>Requests that the server change the Unix file permissions on
<em class="replaceable">filename</em> to
<em class="replaceable">octal_mode</em>, specified in octal numeric
format. Works only if the server supports Unix CIFS extensions.</p>
</dd>
<dt><b><tt class="literal">chown</tt> <em class="replaceable">filename UID GID</em></b></dt>
<dd>
<p>Requests that the server change the owner and group of the file
specified by <em class="replaceable">filename</em> to those provided as
decimal numeric arguments <em class="replaceable">UID</em> and
<em class="replaceable">GID</em>. Works only if the server supports
Unix CIFS extensions.</p>
</dd>
<dt><b><tt class="literal">cd</tt> <em class="replaceable">[directory]</em></b></dt>
<dd>
<p>With no argument, prints the current working directory on the remote
system. If a directory name is supplied as an argument, changes the
working directory on the remote system to that specified.</p>
</dd>
<dt><b><tt class="literal">del</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Requests that the server delete one or more files, as specified by
the argument, from the current working directory. The argument can be
a filename globbing pattern using the * and ? characters.</p>
</dd>
<dt><b><tt class="literal">dir</tt> [<em class="replaceable">filename]</em></b></dt>
<dd>
<p>With no arguments, prints a list of files and directories in the
working directory on the server. If an argument is provided, only
files and directories whose names match the argument will be listed.
The argument can be a filename globbing pattern using the * and ?
characters.</p>
</dd>
<dt><b><tt class="literal">exit</tt></b></dt>
<dd>
<p>Quits the <em class="emphasis">smbclient</em> program after terminating
the SMB connection to the server.</p>
</dd>
<dt><b><tt class="literal">get</tt> <em class="replaceable">remote_file [local_file]</em></b></dt>
<dd>
<p>Copies the file specified by <em class="replaceable">remote_file</em>
from the server to the local system. If no
<em class="replaceable">local_file</em> argument is specified,
<em class="emphasis">smbclient</em> will name the local file the same as
it is named on the server. If <em class="replaceable">local_file</em>
is specified, it will be used as the name of the local copy. See also
the <em class="emphasis">lowercase</em> command.</p>
</dd>
<dt><b><tt class="literal">help</tt> <em class="replaceable">[command]</em></b></dt>
<dd>
<p>A synonym for the <em class="emphasis">?</em> command.</p>
</dd>
<dt><b><tt class="literal">lcd</tt> <em class="replaceable">[directory]</em></b></dt>
<dd>
<p>If no argument is provided, prints the name of
<em class="emphasis">smbclient</em>'s working directory
on the local system. If a directory name is provided as an argument,
changes <em class="emphasis">smbclient</em>'s working
directory to the directory specified.</p>
</dd>
<dt><b><tt class="literal">link</tt> <em class="replaceable">link_name filename</em></b></dt>
<dd>
<p>Requests that the server create a hard link to
<em class="replaceable">filename</em> and name it
<em class="replaceable">link_name</em>. This command works only if the
server supports Unix CIFS extensions.</p>
</dd>
<dt><b><tt class="literal">lowercase</tt></b></dt>
<dd>
<p>Toggles the boolean lowercasing setting. When this setting is on,
names of files copied from the server with the
<em class="emphasis">get</em> and <em class="emphasis">mget</em> commands will
be changed to all lowercase. This is mainly used for accessing
servers that report filenames in all uppercase only.</p>
</dd>
<dt><b><tt class="literal">ls</tt> <em class="replaceable">[filename]</em></b></dt>
<dd>
<p>A synonym for <em class="emphasis">dir</em>.</p>
</dd>
<dt><b><tt class="literal">mask</tt> <em class="replaceable">[globbing_pattern]</em></b></dt>
<dd>
<p>Sets the filename globbing pattern for use with the
<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands when
recursion is turned on. (When recursion is off, the setting has no
effect.) Both <em class="emphasis">mget</em> and <em class="emphasis">mput</em>
accept a globbing pattern as arguments; however, those patterns apply
only to the current directory. This command specifies the pattern
used for all subdirectories that are recursively traversed. The
pattern stays in effect until it is changed with another
<em class="emphasis">mask</em> command. To return the setting to its
original default, specify a
<em class="replaceable">globbing_pattern</em> of an asterisk
(<tt class="literal">*</tt>), which matches all files. See also the
<em class="emphasis">mget</em>, <em class="emphasis">mput</em>, and
<em class="emphasis">recurse</em> commands.</p>
</dd>
<dt><b><tt class="literal">mdir</tt> <em class="replaceable">directory</em></b></dt>
<dd>
<p>A synonym for the <em class="emphasis">mkdir</em> command.</p>
</dd>
<dt><b><tt class="literal">mget</tt> <em class="replaceable">pattern</em></b></dt>
<dd>
<p>When recursion is turned off, copies files matching the file-globbing
pattern, as specified by the argument, from the current working
directory on the server to the local system. When recursion is on,
the <em class="replaceable">pattern</em> argument is used to match
directories in the current working directory, and the pattern
specified by the <em class="emphasis">mask</em> command is used for
matching files within each directory and all subdirectories. See also
the <em class="emphasis">lowercase</em>, <em class="emphasis">mask</em>, and
<em class="emphasis">recurse</em> commands.</p>
</dd>
<dt><b><tt class="literal">print</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Prints the specified file. This requires that
<em class="emphasis">smbclient</em> be connected to a print share. See
also the <em class="emphasis">printmode</em> command.</p>
</dd>
<dt><b><tt class="literal">printmode</tt> <em class="replaceable">mode</em></b></dt>
<dd>
<p>Sets the mode that is used by the <em class="emphasis">print</em> command.
The mode can be either <tt class="literal">text</tt>, for printing text
files such as the ASCII files commonly found on Unix, or
<tt class="literal">graphics</tt>, for printing binary files.</p>
</dd>
<dt><b><tt class="literal">prompt</tt></b></dt>
<dd>
<p>Toggles the prompting mode. When prompting is on (the default), the
<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands will
interactively prompt the user for permission to transfer each file.
The user can answer either <tt class="literal">y</tt> (yes) or
<tt class="literal">n</tt> (no), followed by a newline, to this prompt.
When prompting is off, all the files will be transferred with no
prompts issued.</p>
</dd>
<dt><b><tt class="literal">put</tt> <em class="replaceable">local_file [remote_file]</em></b></dt>
<dd>
<p>Copies the file specified by <em class="replaceable">local_file</em>
from the local to the remote system. If no
<em class="replaceable">remote_file</em> argument is specified,
<em class="emphasis">smbclient</em> will name the remote file the same as
it is named on the local system. If
<em class="replaceable">remote_file</em> is specified, it will be used
as the name of the remote copy. See also the
<em class="emphasis">lowercase</em> command.</p>
</dd>
<dt><b><tt class="literal">queue</tt></b></dt>
<dd>
<p>Prints information on the print queue on the server. This requires
that <em class="emphasis">smbclient</em> is connected to a print share.</p>
</dd>
<dt><b><tt class="literal">quit</tt></b></dt>
<dd>
<p>A synonym for <em class="emphasis">exit</em>.</p>
</dd>
<dt><b><tt class="literal">rd</tt> <em class="replaceable">directory</em></b></dt>
<dd>
<p>A synonym for <em class="emphasis">rmdir</em>.</p>
</dd>
<dt><b><tt class="literal">recurse</tt></b></dt>
<dd>
<p>Toggles the recursion mode, which affects the
<em class="emphasis">mget</em> and <em class="emphasis">mput</em> commands.
When recursion is off (the default), the <em class="emphasis">mget</em>
and <em class="emphasis">mput</em> commands will copy only files from the
current working directory that match the file-globbing pattern
specified as an argument to the command, and the pattern set by the
<em class="emphasis">mask</em> command is ignored. When recursion is
turned on, the <em class="emphasis">mget</em> and
<em class="emphasis">mput</em> commands recursively traverse any
directories that match the pattern specified as the argument to the
command, and the pattern set by the <em class="emphasis">mask</em> command
is used to match files in those directories.</p>
</dd>
<dt><b><tt class="literal">rm</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>A synonym for <em class="emphasis">del</em>.</p>
</dd>
<dt><b><tt class="literal">rmdir</tt> <em class="replaceable">directory</em></b></dt>
<dd>
<p>Requests that the server remove the specified directory.</p>
</dd>
<dt><b><tt class="literal">setmode</tt> <em class="replaceable">filename attributes</em></b></dt>
<dd>
<p>Requests that the server assign the specified MS-DOS file attributes
on the specified file. The <em class="replaceable">attributes</em>
argument has the format of a leading plus sign (<tt class="literal">+</tt>)
or minus sign (<tt class="literal">-</tt>) either to set or to unset the
attribute(s), respectively, followed by one or more of the characters
<tt class="literal">r</tt> (read), <tt class="literal">s</tt> (system),
<tt class="literal">h</tt> (hidden), or <tt class="literal">a</tt> (archive).</p>
</dd>
<dt><b><tt class="literal">symlink</tt> <em class="replaceable">link_name filename</em></b></dt>
<dd>
<p>Requests that the server create a symbolic link named
<em class="replaceable">link_name</em> to
<em class="replaceable">filename</em>. This command works only if the
server supports Unix CIFS extensions. The server will not create a
link that refers to a file not in the share to which
<em class="emphasis">smbclient</em> is connected.</p>
</dd>
<dt><b><tt class="literal">tar</tt> <em class="replaceable">cmd_str</em></b></dt>
<dd>
<p>Performs an archiving operation using the tar format. This is the
interactive form of the <tt class="literal">-T</tt> command-line operation,
and the <em class="replaceable">cmd_str</em> argument is specified in
the same manner. See also the <em class="emphasis">tarmode</em> command.</p>
</dd>
<dt><b><tt class="literal">blocksize</tt> <em class="replaceable">size</em></b></dt>
<dd>
<p>Sets the block size, in units of 512 bytes, for files written by the
<em class="emphasis">tar</em> command.</p>
</dd>
<dt><b><tt class="literal">tarmode</tt> <em class="replaceable">mode ...</em></b></dt>
<dd>
<p>Specifies how the <em class="emphasis">tar</em> command performs its
archiving, including how it handles the archive attribute on files.
Multiple <em class="replaceable">mode</em> arguments can be provided,
chosen from the following:</p>
<dl>
<dt><b><tt class="literal">full</tt></b></dt>
<dd>
<p>All files will be included, regardless of whether their
<tt class="literal">archive</tt> attribute is set. This is the default.</p>
</dd>
<dt><b><tt class="literal">inc</tt></b></dt>
<dd>
<p>Only files that have the <tt class="literal">archive</tt> attribute set
will be included in the backup.</p>
</dd>
<dt><b><tt class="literal">reset</tt></b></dt>
<dd>
<p>The <tt class="literal">archive</tt> attribute will be unset by
<em class="emphasis">tar</em> after the file is included in the archive.</p>
</dd>
<dt><b><tt class="literal">noreset</tt></b></dt>
<dd>
<p>The <tt class="literal">archive</tt> attribute will be left unchanged. This
is the default.</p>
</dd>
<dt><b><tt class="literal">system</tt></b></dt>
<dd>
<p>Files with the <tt class="literal">system</tt> attribute set will be
included in the archive. This is the default.</p>
</dd>
<dt><b><tt class="literal">nosystem</tt></b></dt>
<dd>
<p>Files with the <tt class="literal">system</tt> attribute set will not be
included in the archive.</p>
</dd>
<dt><b><tt class="literal">hidden</tt></b></dt>
<dd>
<p>Files with the <tt class="literal">hidden</tt> attribute set will be
included in the archive. This is the default.</p>
</dd>
<dt><b><tt class="literal">nohidden</tt></b></dt>
<dd>
<p>Files with the <tt class="literal">hidden</tt> attribute set will not be
included in the archive.</p>
</dd>
<dt><b><tt class="literal">verbose</tt></b></dt>
<dd>
<p>As files are included in the archive (when creating the archive) or
are read from the archive (when extracting it), the name of each file
will be printed. This is the default.</p>
</dd>
<dt><b><tt class="literal">noverbose</tt></b></dt>
<dd>
<p>This turns verbose mode off, causing <em class="emphasis">tar</em> to
perform its work quietly.</p>
</dd>
<dt><b><tt class="literal">quiet</tt></b></dt>
<dd>
<p>An antonym for the <tt class="literal">verbose</tt> mode. When quiet is on,
verbose is off, and vice versa.<a name="INDEX-18"/></p>
</dd>
</dl>
</dd>
</dl>
</div>
</div>
<a name="INDEX-19"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbcontrol</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbcontrol</em> command sends control messages to
running <em class="emphasis">smbd</em> or <em class="emphasis">nmbd</em>
processes.</p>
<div class="sect1"><a name="appc-49-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbcontrol -i<em class="replaceable"> [options]</em></pre></blockquote>
<p>or:</p>
<blockquote><pre class="code">smbcontrol <em class="replaceable">[options] process message-type [parameters]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-50-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-i</tt></b></dt>
<dd>
<p>Runs <em class="emphasis">smbcontrol</em> interactively, executing
commands until a blank line or "q"
is read. The user must have superuser privileges.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the location of the Samba configuration file.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">debuglevel</em></b></dt>
<dd>
<p>Sets the debugging level for logging. The debug level can be set from
to 10.</p>
</dd>
</dl>
<p>Whether <em class="emphasis">smbcontrol</em> commands are issued in
interactive mode or from the command line, the commands are in the
same format. Each command has up to three parts:</p>
<dl>
<dt><b><em class="replaceable">process</em></b></dt>
<dd>
<p>Specifies the process or group of processes to which to send the
message. If <em class="replaceable">process</em> is
<tt class="literal">smbd</tt>, all <em class="emphasis">smbd</em> processes will
receive the message. If <em class="replaceable">process</em> is
<tt class="literal">nmbd</tt>, only the main <em class="emphasis">nmbd</em>
process (identified by Samba's
<em class="filename">nmbd.pid</em> file) receives the message. If
<em class="replaceable">process</em> is the numeric PID of a running
process on the system, that process will receive the message.</p>
</dd>
<dt><b><em class="replaceable">message-type</em></b></dt>
<dd>
<p>Specifies the type of message that is sent. For more information, see
<a href="appc.html#appc-51-fm2xml">smbcontrol message
types</a> that follows.</p>
</dd>
<dt><b><em class="replaceable">parameters</em></b></dt>
<dd>
<p>Specifies additional parameters required by some messages.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-51-fm2xml"/>
<h4 class="refsect1">smbcontrol message types</h4>
<dl>
<dt><b><tt class="literal">close-share</tt> <em class="replaceable">share_name</em></b></dt>
<dd>
<p>Closes the connection to a share or shares. If
<em class="replaceable">share_name</em> is specified as an asterisk
(<tt class="literal">*</tt>), connections to all shares will be closed. To
close a single connection, <em class="replaceable">share_name</em> is
given as the name of a share, as specified in the Samba configuration
file, not including the enclosing brackets. Warning: no message is
printed if there is an error in specifying
<em class="replaceable">share_name</em>.</p>
</dd>
<dt><b><tt class="literal">debug</tt> <em class="replaceable">num</em></b></dt>
<dd>
<p>Sets the debugging level. The <em class="replaceable">num</em>
parameter specifies the level, which can be from 0 to 10.</p>
</dd>
<dt><b><tt class="literal">debuglevel</tt></b></dt>
<dd>
<p>Prints the current debugging level.</p>
</dd>
<dt><b><tt class="literal">force-election</tt></b></dt>
<dd>
<p>Can be used only with <em class="emphasis">nmbd</em>, telling it to force
a master browser election.</p>
</dd>
<dt><b><tt class="literal">ping</tt> <em class="replaceable">number</em></b></dt>
<dd>
<p>Sends <em class="emphasis">number</em> of pings and reports when they
receive a reply or timeout. Used for connectivity testing.</p>
</dd>
<dt><b><tt class="literal">profile</tt> <em class="replaceable">mode</em></b></dt>
<dd>
<p>Controls profiling statistics collection. If
<em class="replaceable">mode</em> is <tt class="literal">on</tt>, profile
statistics will be collected. If <em class="replaceable">mode</em> is
<tt class="literal">off</tt>, collection of statistics is turned off. If
<em class="replaceable">mode</em> is specified as
<tt class="literal">count</tt>, only counting statistics are collected (and
not timing statistics). If <em class="replaceable">mode</em> is
<tt class="literal">flush</tt>, the data set is cleared (initialized).</p>
</dd>
<dt><b><tt class="literal">profilelevel</tt></b></dt>
<dd>
<p>Prints the current profiling level.</p>
</dd>
<dt><b><tt class="literal">printer-notify</tt> <em class="replaceable">printer_name</em></b></dt>
<dd>
<p>Sends a printer notify message to Windows NT/2000/XP for the
specified printer. This message can be sent only to
<em class="emphasis">smbd</em>. Warning: no message is printed if the
<em class="replaceable">printer_name</em> parameter is specified
incorrectly.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-20"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbgroupedit</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This command, new to Samba 3.0, sets up mappings between Unix groups
and Windows NT/2000/XP groups and also allows a Unix group to become
a domain group. This command must be run by the superuser.</p>
<div class="sect1"><a name="appc-53-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbgroupedit <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-54-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-a</tt> <em class="replaceable">Unix_group_name</em></b></dt>
<dd>
<p>Adds a mapping for the specified Unix group. The
<tt class="literal">-n</tt> option is used along with this option to
specify the Windows NT group to which the Unix group is mapped.</p>
</dd>
<dt><b><tt class="literal">-c</tt> <em class="replaceable">SID</em></b></dt>
<dd>
<p>Changes a mapping between a Windows NT group and a Unix group. The
Windows NT group is specified as a SID with this option, and the Unix
group is specified with the <tt class="literal">-u</tt> option.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">description</em></b></dt>
<dd>
<p>Specifies a comment for the mapping, which will be stored along with
it.</p>
</dd>
<dt><b><tt class="literal">-l</tt></b></dt>
<dd>
<p>When used with the <tt class="literal">-v</tt> option, prints a long
listing. This is the default. The information printed includes the
name of the Windows NT group, its SID, its corresponding Unix group
(if a mapping has been defined), the group type, the comment, and the
privileges of the group.</p>
</dd>
<dt><b><tt class="literal">-n</tt> <em class="replaceable">Windows_group_name</em></b></dt>
<dd>
<p>Specifies the name of the Windows NT group. Used with the
<tt class="literal">-a</tt> option.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">privilege</em></b></dt>
<dd>
<p>Used along with the <tt class="literal">-a</tt> option to specify a Windows
NT privilege to be given to the Unix group.</p>
</dd>
<dt><b><tt class="literal">-s</tt></b></dt>
<dd>
<p>When used with the <tt class="literal">-v</tt> option, prints a short
listing. The information printed includes just the name of the
Windows NT group, its SID, and, if a mapping has been defined, its
corresponding Unix group. This option is useful for determining the
SID of a group, for use with the <tt class="literal">-c</tt> option.</p>
</dd>
<dt><b><tt class="literal">-t</tt> <em class="replaceable">TYPE</em></b></dt>
<dd>
<p>Assigns a Windows group type to the group.
<em class="replaceable">TYPE</em> is a single character, and is one of
<tt class="literal">b</tt> (built-in), <tt class="literal">d</tt> (domain), or
<tt class="literal">l</tt> (local).</p>
</dd>
<dt><b><tt class="literal">-u</tt> <em class="replaceable">Unix_group_name</em></b></dt>
<dd>
<p>Specifies the name of the Unix group to map to the Windows NT group.
Used with the <tt class="literal">-c</tt> option.</p>
</dd>
<dt><b><tt class="literal">-v</tt></b></dt>
<dd>
<p>Prints a list of groups in the Windows NT domain in which the Samba
server is operating. See also the <tt class="literal">-l</tt> and
<tt class="literal">-s</tt> options.</p>
</dd>
<dt><b><tt class="literal">-x</tt> <em class="replaceable">Unix_group_name</em></b></dt>
<dd>
<p>Deletes the mapping for the Unix group specified.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-21"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbmnt</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a low-level helper program for mounting smbfs filesystems. It
used by <em class="emphasis">smbmount</em> to do the privileged part of
the mount operation on behalf of an ordinary user. Generally, users
should not run this command directly.</p>
<div class="sect1"><a name="appc-56-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbmnt mnt_point <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-57-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-r</tt></b></dt>
<dd>
<p>Mounts the filesystem as read-only.</p>
</dd>
<dt><b><tt class="literal">-u</tt> <em class="replaceable">uid</em> </b></dt>
<dd>
<p>Specifies the UID to use for the owner of the files.</p>
</dd>
<dt><b><tt class="literal">-g</tt> <em class="replaceable">gid</em></b></dt>
<dd>
<p>Specifies the GID to use for the group of the files.</p>
</dd>
<dt><b><tt class="literal">-f</tt> <em class="replaceable">mask</em></b></dt>
<dd>
<p>Specifies the octal file mask.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">mask</em></b></dt>
<dd>
<p>Specifies the octal directory mask.</p>
</dd>
<dt><b><tt class="literal">-o</tt> <em class="replaceable">options</em></b></dt>
<dd>
<p>Specifies the list of options that are passed to the smbfs module.</p>
</dd>
</dl>
<p>To allow users to mount SMB shares without help from an
administrator, set the "set user
ID" permission on the <em class="emphasis">smbmnt</em>
executable. However, note that this can raise security issues.</p>
</div>
</div>
<a name="INDEX-22"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbmount</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program mounts an smbfs filesystem on a mount point in the Unix
filesystem. It is typically called as <em class="emphasis">mount.smb</em>
from <em class="emphasis">mount</em>, although it can also be run directly
by users. After mounting the smbfs filesystem,
<em class="emphasis">smbmount</em> continues to run as a daemon as long as
the filesystem is mounted. It logs events in the file
<em class="filename">log.smbmount</em> in the same directory as the other
Samba log files (which is commonly
<em class="filename">/usr/local/samba/var</em> by default). The logging
level is controlled by the <tt class="literal">debug level</tt> parameter
in the Samba configuration file.</p>
<div class="sect1"><a name="appc-59-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbmount <em class="replaceable">service mount_point [-o options]</em></pre></blockquote>
<p>The service argument specifies the SMB share to mount, given as a
UNC. The <em class="replaceable">mount_point</em> argument specifies a
directory to use as the mount point. The options to
<em class="emphasis">smbmount</em> are specified as a comma-separated list
of
<em class="replaceable">key</em><tt class="literal">=</tt><em class="replaceable">value</em>
pairs. The documented options are as follows. Others can be passed if
the kernel supports them.</p>
</div>
<div class="sect1"><a name="appc-60-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">username=</tt><em class="replaceable">name</em></b></dt>
<dd>
<p>Specifies the username to connect as. If this is not provided, the
environment variable USER will be tried. The name can be specified as
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>,
<em class="replaceable">user</em><tt class="literal">/</tt><em class="replaceable">workgroup</em>,
or
<em class="replaceable">user</em><tt class="literal">/</tt><em class="replaceable">workgroup</em><tt class="literal">%</tt><em class="replaceable">password</em>.</p>
</dd>
<dt><b><tt class="literal">password=</tt><em class="replaceable">string</em></b></dt>
<dd>
<p>Specifies the SMB password. If no password is provided using this
option, the <em class="emphasis">username</em> option, or the
<em class="emphasis">credentials</em> option, the environment variable
PASSWD is used. If that also does not exist,
<em class="emphasis">smbmount</em> will prompt interactively for a
password.</p>
</dd>
<dt><b><tt class="literal">credentials=</tt><em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies a file that contains a username and password in the
following format:</p>
<blockquote><pre class="code">username = <em class="replaceable">value</em>
password = <em class="replaceable">value</em></pre></blockquote>
</dd>
<dt><b><tt class="literal">uid=</tt><em class="replaceable">number</em></b></dt>
<dd>
<p>Sets the Unix user ID to be used as the owner of all files in the
mounted filesystem. It can be specified as a username or numeric UID.
Defaults to the UID of the user running
<em class="emphasis">smbmount</em>.</p>
</dd>
<dt><b><tt class="literal">gid=</tt><em class="replaceable">number</em></b></dt>
<dd>
<p>Sets the Unix group ID to be used as the group for all files in the
mounted filesystem. It can be specified as a group name or a numeric
GID. Defaults to the GID of the user running
<em class="emphasis">smbmount</em>.</p>
</dd>
<dt><b><tt class="literal">port=</tt><em class="replaceable">number</em></b></dt>
<dd>
<p>Sets the TCP port number. This is 139, which is required by most
Windows versions.</p>
</dd>
<dt><b><tt class="literal">fmask=</tt><em class="replaceable">octal_mask</em> </b></dt>
<dd>
<p>Sets the Unix permissions of all files in the mounted filesystem.
Defaults to the user's current umask.</p>
</dd>
<dt><b><tt class="literal">dmask=</tt><em class="replaceable">octal_mask</em></b></dt>
<dd>
<p>Sets the Unix permissions of all directories in the mounted
filesystem. Defaults to the current umask.</p>
</dd>
<dt><b><tt class="literal">debug=</tt><em class="replaceable">number</em></b></dt>
<dd>
<p>Sets the debugging level.</p>
</dd>
<dt><b><tt class="literal">ip=</tt><em class="replaceable">host</em></b></dt>
<dd>
<p>Sets the destination hostname or IP address.</p>
</dd>
<dt><b><tt class="literal">netbiosname=</tt><em class="replaceable">name</em></b></dt>
<dd>
<p>Sets the computer name to connect as. This defaults to the hostname
of the local system.</p>
</dd>
<dt><b><tt class="literal">workgroup=</tt><em class="replaceable">name</em></b></dt>
<dd>
<p>Sets the workgroup or domain.</p>
</dd>
<dt><b><tt class="literal">sockopt=</tt><em class="replaceable">opts</em></b></dt>
<dd>
<p>Sets TCP socket options.</p>
</dd>
<dt><b><tt class="literal">scope=</tt><em class="replaceable">num</em></b></dt>
<dd>
<p>Sets the NetBIOS scope.</p>
</dd>
<dt><b><tt class="literal">guest</tt></b></dt>
<dd>
<p>Don't expect or prompt for a password.</p>
</dd>
<dt><b><tt class="literal">ro</tt></b></dt>
<dd>
<p>Mounts the share read-only.</p>
</dd>
<dt><b><tt class="literal">rw</tt></b></dt>
<dd>
<p>Mounts the share read-write.</p>
</dd>
<dt><b><tt class="literal">iocharset=</tt><em class="replaceable">charset</em></b></dt>
<dd>
<p>Sets the charset used by the Linux machine for codepage-to-charset
translation. See also the <em class="emphasis">codepage</em> option.</p>
</dd>
<dt><b><tt class="literal">codepage=</tt><em class="replaceable">page</em></b></dt>
<dd>
<p>Sets the DOS code page. See also the <em class="emphasis">iocharset</em>
option.</p>
</dd>
<dt><b><tt class="literal">ttl=</tt><em class="replaceable">milliseconds</em></b></dt>
<dd>
<p>Sets the time to live, in milliseconds, for entries in the directory
cache. A higher value gives better performance on large directories
and/or slower connections. The default is 1000ms. Try 10000ms (10
seconds) as a starting value if directory operations are visibly
slow.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-23"/><a name="INDEX-24"/><a name="INDEX-25"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbpasswd</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbpasswd</em> program provides the general
function of managing <a name="INDEX-24"/><a name="INDEX-25"/>encrypted
passwords. How it works depends on whether it is run by the superuser
or an ordinary user.</p><p>For the superuser, <em class="emphasis">smbpasswd</em> can be used to
maintain Samba's <em class="filename">smbpasswd</em>
file. It can add or delete users, change their passwords, and modify
other attributes pertaining to the user that are held in the
<em class="filename">smbpasswd</em> file.</p><p>When run by ordinary users, <em class="emphasis">smbpasswd</em> can be
used only to change their encrypted passwords. In this mode of
operation, <em class="emphasis">smbpasswd</em> acts as a client to the
<em class="emphasis">smbd</em> daemon. The program will fail if
<em class="emphasis">smbd</em> is not operating, if the <tt class="literal">hosts
allow</tt> or <tt class="literal">hosts deny</tt> parameters in the
Samba configuration file do not permit connections from localhost (IP
address 127.0.0.1), or if the <tt class="literal">encrypted passwords</tt>
option is set to <tt class="literal">no</tt>. It is also possible for
<em class="emphasis">smbpasswd</em> to change a user's
password when it is maintained on a remote system, including a
Windows NT domain controller.</p>
<div class="sect1"><a name="appc-62-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<p>When run by the superuser:</p>
<blockquote><pre class="code">smbpasswd <em class="replaceable">[options] [username] [password]</em></pre></blockquote>
<p>In this case, the username of the user whose
<em class="emphasis">smbpasswd</em> entry is to be modified is provided as
the second argument.</p>
<p>Otherwise:</p>
<blockquote><pre class="code">smbpasswd <em class="replaceable">[options] [password]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-63-fm2xml"/>
<h4 class="refsect1">Superuser-only options</h4>
<dl>
<dt><b><tt class="literal">-a</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Adds a user to the encrypted password file. The user must already
exist in the system password file (<em class="filename">/etc/passwd</em>
). If the user already exists in the <em class="filename">smbpasswd</em>
file, the <tt class="literal">-a</tt> option changes the existing password.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Disables a user in the encrypted password file. The
user's entry in the file will remain, but will be
marked with a flag disabling the user from authenticating.</p>
</dd>
<dt><b><tt class="literal">-e</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Enables a disabled user in the encrypted password file. This
overrides the effect of the <tt class="literal">-d</tt> option.</p>
</dd>
<dt><b><tt class="literal">-j</tt> <em class="replaceable">domain</em></b></dt>
<dd>
<p>Joins the Samba server to a Windows NT domain as a domain member
server. The <em class="replaceable">domain</em> argument is the NetBIOS
name of the Windows NT domain that is being joined. See also the
<tt class="literal">-r</tt> and <tt class="literal">-U</tt> options.</p>
</dd>
<dt><b><tt class="literal">-m</tt></b></dt>
<dd>
<p>Indicates that the account is a computer account in a Windows NT
domain rather than a domain user account.</p>
</dd>
<dt><b><tt class="literal">-n</tt></b></dt>
<dd>
<p>Sets the user's password to a null password. For the
user to authenticate, the parameter <tt class="literal">null</tt>
<tt class="literal">passwords</tt> <tt class="literal">=</tt>
<tt class="literal">yes</tt> must exist in the <tt class="literal">[global]</tt>
section of the Samba configuration file.</p>
</dd>
<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order_list</em></b></dt>
<dd>
<p>Sets the resolve order of the name servers. This option is similar to
the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
option and can take any of the four parameters
<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
If more than one is specified, the argument is specified as a
space-separated list.</p>
</dd>
<dt><b><tt class="literal">-w</tt> <em class="replaceable">password</em></b></dt>
<dd>
<p>For use when Samba has been compiled with the
<tt class="literal">--with-ldapsam</tt> configure option. Specifies the
password that goes with the value of the <tt class="literal">ldap admin
dn</tt> Samba configuration file parameter.</p>
</dd>
<dt><b><tt class="literal">-x</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Deletes the user from the <em class="filename">smbpasswd</em> file. This
is a one-way operation, and all information associated with the entry
is lost. To disable the account without deleting the
user's entry in the file, see the
<tt class="literal">-d</tt> option.</p>
</dd>
</dl>
</div>
<div class="sect1"><a name="appc-64-fm2xml"/>
<h4 class="refsect1">Other options</h4>
<dl>
<dt><b><tt class="literal">-c</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the Samba configuration file, overriding the compiled-in
default.</p>
</dd>
<dt><b><tt class="literal">-D</tt> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (also called logging) level. The level can range from
to 10. Debug level 0 logs only the most important messages; level 1
is normal; levels 3 and above are primarily for debugging and slow
the program considerably.</p>
</dd>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints command-line usage information.</p>
</dd>
<dt><b><tt class="literal">-L</tt></b></dt>
<dd>
<p>Causes <em class="emphasis">smbpasswd</em> to run in local mode, in which
ordinary users are allowed to use the superuser-only options. This
requires that the <em class="filename">smbpasswd</em> file be made
readable and writable by the user. This is for testing purposes.</p>
</dd>
<dt><b><tt class="literal">-r</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
<dd>
<p>Specifies on which machine the password should change. If changing a
Windows NT domain password, the remote system specified by
<em class="replaceable">NetBIOS_name</em> must be the PDC for the
domain. The user's username on the local system is
used by default. See also the <tt class="literal">-U</tt> option for use
when the user's Samba username is different from the
local username.</p>
</dd>
<dt><b><tt class="literal">-R</tt> <em class="replaceable">resolve_order</em></b></dt>
<dd>
<p>Sets the resolve order of the name servers. This option is similar to
the resolve order configuration option and can take any of the four
parameters <tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
If more than one is specified, the argument is specified as a
space-separated list.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Causes <em class="emphasis">smbpasswd</em> not to prompt for passwords
from <em class="filename">/dev/tty</em>, but instead to read the old and
new passwords from the standard input. This is useful when calling
<em class="emphasis">smbpasswd</em> from a script.</p>
</dd>
<dt><b><tt class="literal">-S</tt></b></dt>
<dd>
<p>Queries the domain controller of the domain, as specified by the
<tt class="literal">workgroup</tt> parameter in the Samba configuration
file, and retrieves the domain's SID. This will then
be used as the SID for the local system. A specific PDC can be
selected by combining this option with the <tt class="literal">-r</tt>
option, and its domain's SID will be used. This
option is for migrating domain accounts from a Windows NT primary
domain controller to a Samba PDC.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">username[</em><tt class="literal">%</tt><em class="replaceable">password]</em></b></dt>
<dd>
<p>Changes the password for <em class="replaceable">username</em> on the
remote system. This is to handle instances in which the remote
username and local username are different. This option requires that
<tt class="literal">-r</tt> also be used. Often used with
<tt class="literal">-j</tt> to provide the username of the administrative
user on the primary domain controller for adding computer accounts.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-26"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbsh</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbsh</em> program allows SMB shares to be
accessed from a Unix system. When <em class="emphasis">smbsh</em> is run,
an extra directory tree called <em class="filename">/smb </em>becomes
available to dynamically linked shell commands. The first level of
directories under <em class="filename">/smb</em> represent available
workgroups, the next level of subdirectories represent the SMB
servers in each workgroup, and the third level of subdirectories
represent the disk and printer shares of each server.</p><p>Samba must be compiled with the <tt class="literal">--with-smbwrappers</tt>
option to enable <em class="emphasis">smbsh</em>.</p>
<div class="sect1"><a name="appc-66-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><em class="emphasis">-d</em> <em class="replaceable">debug_level</em></b></dt>
<dd>
<p>Sets the debug (sometimes called logging) level. The level can range
from 0, the default, to 10. Debug level 0 logs only the most
important messages; level 1 is normal; levels 3 and above are
primarily for debugging and slow <em class="emphasis">smbsh</em>
considerably.</p>
</dd>
<dt><b><em class="emphasis">-l</em> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Sets the name of the logging file. By default, messages are sent to
<em class="emphasis">stderr</em>.</p>
</dd>
<dt><b><em class="emphasis">-L</em> <em class="replaceable">directory</em></b></dt>
<dd>
<p>Specifies the location of
<em class="emphasis">smbsh</em>'s shared libraries,
overriding the compiled-in default.</p>
</dd>
<dt><b><em class="emphasis">-P</em> <em class="replaceable">prefix</em></b></dt>
<dd>
<p>Sets the name of the <tt class="literal">root</tt> directory to use for the
SMB filesystem. The default is <em class="filename">/smb</em>.</p>
</dd>
<dt><b><em class="emphasis">-R</em> <em class="replaceable">resolve_order</em></b></dt>
<dd>
<p>Sets the resolve order of the name servers. This option is similar to
the <tt class="literal">resolve</tt> <tt class="literal">order</tt> configuration
option and can take any of the four parameters
<tt class="literal">lmhosts</tt>, <tt class="literal">host</tt>,
<tt class="literal">wins</tt>, and <tt class="literal">bcast</tt>, in any order.
If more than one is specified, the argument is specified as a
space-separated list.</p>
</dd>
<dt><b><em class="emphasis">-U</em> <em class="replaceable">username</em></b></dt>
<dd>
<p>Provides the username, and optionally the password, for
authenticating the connection to the SMB server. The password can be
supplied using the
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
format. If either or both the username and password are not provided,
<em class="emphasis">smbsh</em> will prompt interactively for them.</p>
</dd>
<dt><b><em class="emphasis">-W</em> <em class="replaceable">workgroup</em></b></dt>
<dd>
<p>Specifies the NetBIOS workgroup or domain to which the client will
connect. This overrides the workgroup parameter in the Samba
configuration file and is sometimes necessary to connect to some
servers.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-27"/><a name="INDEX-28"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbspool</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbspool</em> program provides a
<a name="INDEX-28"/>CUPS-compatible
interface to Samba printing by providing a way to send a print job to
an SMB printer using the command-line format specified by CUPS
printers. Although <em class="emphasis">smbspool</em> is designed to work
best with CUPS printers, it can be used to send print jobs to
non-CUPS Samba printers as well.</p>
<div class="sect1"><a name="appc-68-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbspool <em class="replaceable">job user title copies options filename</em></pre></blockquote>
<p>The arguments for <em class="emphasis">smbspool</em>, as shown here, are
those used in the CUPS printing system. However, some of the
arguments are currently ignored because they don't
correspond to the Samba printing system. These arguments must be
supplied in the command and can be filled in with
"dummy" values.</p>
<p>The <em class="replaceable">job</em> argument refers to the job number
and is currently ignored. The <em class="replaceable">user</em>
argument is the name of the user who submitted the print job and is
also ignored. The <em class="replaceable">title</em> argument is the
name of the print job and must be supplied. It is used as the name of
the remote print file. The <em class="replaceable">copies</em> argument
is the number of copies that will be printed. This number is used
only if the (optional) <em class="filename">filename</em> argument is
supplied. Otherwise, only one copy is printed. The
<em class="replaceable">options</em> argument, for specifying printing
options, is ignored. The <em class="replaceable">filename</em> argument
is used for specifying the name of the file to be printed. If it is
not provided, the standard input will be used.</p>
<p>The printer that the job is to be sent to is specified in the
DEVICE_URI environment variable. The format for the printer name is a
device Universal Resource Indicator, which can be in any of the
following formats:</p>
<blockquote class="simplelist">
<p><em class="emphasis">smb://server/printer</em></p>
<p><em class="emphasis">smb://workgroup/server/printer</em></p>
<p><em class="emphasis">smb://username:password@server/printer</em></p>
<p><em class="emphasis">smb://username:password@workgroup/server/printer</em></p>
</blockquote>
</div>
</div>
<a name="INDEX-29"/><a name="INDEX-30"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbstatus</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program lists the current connections on a Samba server.</p>
<div class="sect1"><a name="appc-70-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-b</tt></b></dt>
<dd>
<p>Causes <em class="emphasis">smbstatus</em> to produce brief output. This
includes the version of Samba and auditing information about the
users that are connected to the server.</p>
</dd>
<dt><b><tt class="literal">-d</tt></b></dt>
<dd>
<p>Gives verbose output, which includes a list of services, a list of
locked files, and memory usage statistics. This is the default.</p>
</dd>
<dt><b><tt class="literal">-L</tt></b></dt>
<dd>
<p>Prints only the list of current file locks.</p>
</dd>
<dt><b><tt class="literal">-p</tt></b></dt>
<dd>
<p>Prints only a list of <em class="emphasis">smbd</em> process IDs.</p>
</dd>
<dt><b><tt class="literal">-P</tt></b></dt>
<dd>
<p>Prints only the contents of the profiling memory area. Requires that
Samba has been compiled with the profiling option.</p>
</dd>
<dt><b><tt class="literal">-S</tt></b></dt>
<dd>
<p>Prints only a list of shares and their connections.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the Samba configuration file to use when processing this
command.</p>
</dd>
<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Limits the report to the activity of a single user.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-31"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbtar</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbtar</em> program is a shell-script wrapper
around <em class="emphasis">smbclient</em> for doing tar-format archiving
operations. It is functionally very similar to the Unix
<em class="emphasis">tar</em> program.</p>
<div class="sect1"><a name="appc-72-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbtar <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-73-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-a</tt></b></dt>
<dd>
<p>Resets (clears) the archive attribute on files after they are backed
up. The default is to leave the archive attribute unchanged.</p>
</dd>
<dt><b><tt class="literal">-b</tt> <em class="replaceable">blocksize</em></b></dt>
<dd>
<p>Sets block size, in units of 512 bytes, for reading or writing the
archive file. Defaults to 20, which results in a block size of 10240
bytes.</p>
</dd>
<dt><b><tt class="literal">-d</tt> <em class="replaceable">directory</em></b></dt>
<dd>
<p>Changes the working directory on the remote system to
<em class="replaceable">directory</em> before starting the restore or
backup operation.</p>
</dd>
<dt><b><tt class="literal">-i</tt></b></dt>
<dd>
<p>Specifies incremental mode; files are backed up only if they have the
DOS archive attribute set. The archive attribute is reset (cleared)
after each file is read.</p>
</dd>
<dt><b><tt class="literal">-l</tt> <em class="replaceable">log_level</em></b></dt>
<dd>
<p>Sets the logging level. This corresponds to the <tt class="literal">-d</tt>
option of <em class="emphasis">smbclient</em> and other Samba programs.</p>
</dd>
<dt><b><tt class="literal">-N</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Backs up only files newer than <em class="filename">filename</em>. For
incremental backups.</p>
</dd>
<dt><b><tt class="literal">-p</tt> <em class="replaceable">password</em></b></dt>
<dd>
<p>Specifies the password to use to access a share. An alternative to
using the
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>
format with the <tt class="literal">-u</tt> option.</p>
</dd>
<dt><b><tt class="literal">-r</tt></b></dt>
<dd>
<p>Restores files to the share from the tar file.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">server</em></b></dt>
<dd>
<p>Specifies the SMB server. See also the <tt class="literal">-x</tt> option.</p>
</dd>
<dt><b><tt class="literal">-t</tt> <em class="replaceable">filename</em></b></dt>
<dd>
<p>Specifies the file or Unix device to use as the archiving medium. The
default is <em class="filename">tar.out</em> or the value of the TAPE
environment variable, if it has been set.</p>
</dd>
<dt><b><tt class="literal">-u</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Specifies the user account to use when connecting to the share. You
can specify the password as well, in the format
<em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em>.
The username defaults to the user's Unix username.</p>
</dd>
<dt><b><tt class="literal">-v</tt></b></dt>
<dd>
<p>Operates in verbose mode, printing error messages and additional
information that can be used in debugging and monitoring. Backup and
restore operations will list each file as it is processed.</p>
</dd>
<dt><b><tt class="literal">-x</tt> <em class="replaceable">share</em></b></dt>
<dd>
<p>States the name of the share on the server to which to connect. The
default is <tt class="literal">backup</tt>. See also the
<tt class="literal">-s</tt> option.</p>
</dd>
<dt><b><tt class="literal">-X</tt> <em class="replaceable">file_list</em></b></dt>
<dd>
<p>Tells <em class="emphasis">smbtar</em> to exclude the specified files from
the backup or restore operation.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-32"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>smbumount</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">smbumount</em> command exists to allow an
ordinary (nonsuperuser) user to unmount a smbfs filesystem, which the
user had previously mounted using <em class="emphasis">smbmount</em>.</p>
<div class="sect1"><a name="appc-75-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">smbumount <em class="replaceable">mount_point</em></pre></blockquote>
<p>For ordinary users to issue the command,
<em class="emphasis">smbumount</em> must be made suid
<tt class="literal">root</tt>.</p>
</div>
</div>
<a name="INDEX-33"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>testparm</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>The <em class="emphasis">testparm</em> program checks a Samba
configuration file for obvious errors.</p>
<div class="sect1"><a name="appc-77-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">testparm <em class="replaceable">[options] [filename] [hostname IP_addr]</em></pre></blockquote>
<p>If the configuration file is not provided using the
<em class="filename">filename</em> argument, then it defaults to
<em class="filename">/usr/local/samba/lib/smb.conf</em>. If the hostname
and an IP address of a system are included, an extra check is made to
ensure that the system is allowed to connect to each service defined
in the configuration file. This is done by comparing the hostname and
IP address to the definitions of the <tt class="literal">hosts allow</tt>
and <tt class="literal">hosts deny</tt> parameters.</p>
</div>
<div class="sect1"><a name="appc-78-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-h</tt></b></dt>
<dd>
<p>Prints usage information for the program.</p>
</dd>
<dt><b><tt class="literal">-L</tt> <em class="replaceable">server_name</em></b></dt>
<dd>
<p>Sets the <tt class="literal">%L</tt> configuration variable to the
specified server name.</p>
</dd>
<dt><b><tt class="literal">-s</tt></b></dt>
<dd>
<p>Disables the default behavior of prompting for the Enter key to be
pressed before printing the list of configuration options for the
server.</p>
</dd>
</dl>
</div>
</div>
<a name="INDEX-34"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>testprns</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This is a very simple program that checks to see if a specified
printer name exists in the system printer capabilities (printcap)
file.</p>
<div class="sect1"><a name="appc-80-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">testprns <em class="replaceable">printername [printcapname]</em></pre></blockquote>
<p>If <em class="replaceable">printcapname</em> isn't
specified, Samba attempts to use the one specified in the Samba
configuration file with the <tt class="literal">printcap name</tt>
parameter. If none is specified there, Samba will try
<em class="filename">/etc/printcap</em>.</p>
</div>
</div>
<a name="INDEX-35"/><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b><i>wbinfo</i></b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black"/><table width="515" border="0" cellpadding="5"><tr><td align="left"/><td align="right"/></tr></table><p>This program retrieves and prints information from the
<em class="emphasis">winbindd</em> daemon, which must be running for
<em class="emphasis">wbinfo</em> to function.</p>
<div class="sect1"><a name="appc-82-fm2xml"/>
<h4 class="refsect1">Command synopsis</h4>
<blockquote><pre class="code">wbinfo <em class="replaceable">[options]</em></pre></blockquote>
</div>
<div class="sect1"><a name="appc-83-fm2xml"/>
<h4 class="refsect1">Options</h4>
<dl>
<dt><b><tt class="literal">-u</tt> </b></dt>
<dd>
<p>Prints all usernames that have been mapped from the Windows NT domain
to Unix users. Users in all trusted domains are also listed.</p>
</dd>
<dt><b> <tt class="literal">-</tt><em class="emphasis">g</em> </b></dt>
<dd>
<p>Prints all group names that have been mapped from the Windows NT
domain to Unix groups. Groups in all trusted domains are also
reported.</p>
</dd>
<dt><b><tt class="literal">-h</tt> <em class="replaceable">NetBIOS_name</em></b></dt>
<dd>
<p>Queries the WINS server and prints the IP address of the specified
system.</p>
</dd>
<dt><b><tt class="literal">-n</tt> <em class="replaceable">name</em> </b></dt>
<dd>
<p>Prints the SID corresponding to the name specified. The argument can
be specified as <em class="replaceable">DOMAIN/name</em> (or by using a
character other than the slash, as defined by the winbind separator
character) to specify both the domain and the name. If the domain and
separator are omitted, the value of the <tt class="literal">workgroup</tt>
parameter in the Samba configuration file is used as the name of the
domain.</p>
</dd>
<dt><b><tt class="literal">-s</tt> <em class="replaceable">SID</em> </b></dt>
<dd>
<p>Prints the name mapped to a SID, which is specified in the format
<tt class="literal">S-1-</tt><em class="replaceable">N-N-D-D-D-R</em>.</p>
</dd>
<dt><b><tt class="literal">-U</tt> <em class="replaceable">UID</em></b></dt>
<dd>
<p>Prints the SID mapped to a Unix UID, if one exists in the current
domain.</p>
</dd>
<dt><b><tt class="literal">-G</tt> <em class="replaceable">gid</em></b></dt>
<dd>
<p>Prints the SID mapped to a Unix group ID, if one exists in the
current domain.</p>
</dd>
<dt><b><tt class="literal">-S</tt> <em class="replaceable">SID</em></b></dt>
<dd>
<p>Prints the Unix UID that winbind has mapped to the specified SID, if
one exists.</p>
</dd>
<dt><b><tt class="literal">-Y</tt> <em class="replaceable">SID</em></b></dt>
<dd>
<p>Prints the Unix group ID that winbind has mapped to the specified
SID, if one exists.</p>
</dd>
<dt><b><tt class="literal">-t</tt></b></dt>
<dd>
<p>Tests to see that the workstation trust account for the Samba server
is valid.</p>
</dd>
<dt><b><tt class="literal">-m</tt> </b></dt>
<dd>
<p>Prints a list of Windows NT domains trusted by the Windows server.
This does not include the PDC's domain.</p>
</dd>
<dt><b><tt class="literal">-r</tt> <em class="replaceable">username</em></b></dt>
<dd>
<p>Prints the list of Unix group IDs to which the user belongs. This
works only if the user's account is maintained on a
domain controller.</p>
</dd>
<dt><b><tt class="literal">-a</tt> <em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em></b></dt>
<dd>
<p>Checks to see if a user can authenticate through
<em class="emphasis">winbindd</em> using the specified username and
password.</p>
</dd>
<dt><b><tt class="literal">-A</tt> <em class="replaceable">username</em><tt class="literal">%</tt><em class="replaceable">password</em></b></dt>
<dd>
<p>Saves the username and password used by <em class="emphasis">winbindd</em>
to the domain controller. For use when operating in a Windows 2000
domain.</p>
</dd>
</dl>
</div>
</div>
<hr/><h4 class="head4"><a href="toc.html">TOC</a></h4>
</body></html>
|