~ubuntu-branches/ubuntu/gutsy/samba/gutsy-updates

« back to all changes in this revision

Viewing changes to docs/manpages/net.8

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2006-11-28 20:14:37 UTC
  • mfrom: (0.10.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061128201437-a6x4lzlhempazocp
Tags: 3.0.23d-1ubuntu1
* Merge from debian unstable.
* Drop python2.4-samba, replace with python-samba. Added Conflicts/Replaces
  on python2.4-samba
* Drop track-connection-dos.patch, ubuntu-winbind-panic.patch, 
  ubuntu-fix-ldap.patch, ubuntu-setlocale.patch, ubuntu-setlocale-fixes.patch
* Remaining Ubuntu changes:
  - Revert Debian's installation of mount.cifs and umount.cifs as suid
  - Comment out the default [homes] shares and add more verbose comments to
    explain what they do and how they work (closes: launchpad.net/27608)
  - Add a "valid users = %S" stanza to the commented-out [homes] section, to
    show users how to restrict access to \\server\username to only username.
  - Change the (commented-out) "printer admin" example to use "@lpadmin"
    instead of "@ntadmin", since the lpadmin group is used for spool admin.
  - Alter the panic-action script to encourage users to report their
    bugs in Ubuntu packages to Ubuntu, rather than reporting to Debian.
    Modify text to more closely match the Debian script
  - Munge our init script to deal with the fact that our implementation
    (or lack thereof) of log_daemon_msg and log_progress_msg differs
    from Debian's implementation of the same (Ubuntu #19691)
  - Kept ubuntu-auxsrc.patch: some auxilliary sources (undocumented in 
    previous changelogs)
  - Set default workgroup to MSHOME

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
.IP "\\$1" \\$2
19
19
..
20
20
.TH "NET" 8 "" "" ""
21
 
.SH NAME
22
 
net \- Tool for administration of Samba and remote CIFS servers.
 
21
.SH "NAME"
 
22
net - Tool for administration of Samba and remote CIFS servers.
23
23
.SH "SYNOPSIS"
24
 
.ad l
25
 
.hy 0
26
24
.HP 4
27
 
\fBnet\fR {<ads|rap|rpc>} [\-h] [\-w\ workgroup] [\-W\ myworkgroup] [\-U\ user] [\-I\ ip\-address] [\-p\ port] [\-n\ myname] [\-s\ conffile] [\-S\ server] [\-l] [\-P] [\-d\ debuglevel] [\-V]
28
 
.ad
29
 
.hy
30
 
 
 
25
\fBnet\fR {<ads|rap|rpc>} [-h] [-w�workgroup] [-W�myworkgroup] [-U�user] [-I�ip-address] [-p�port] [-n�myname] [-s�conffile] [-S�server] [-l] [-P] [-d�debuglevel] [-V]
31
26
.SH "DESCRIPTION"
32
 
 
33
 
.PP
34
 
This tool is part of the \fBsamba\fR(7) suite\&.
35
 
 
36
 
.PP
37
 
The samba net utility is meant to work just like the net utility available for windows and DOS\&. The first argument should be used to specify the protocol to use when executing a certain command\&. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC can be used for NT4 and Windows 2000\&. If this argument is omitted, net will try to determine it automatically\&. Not all commands are available on all protocols\&.
38
 
 
 
27
.PP
 
28
This tool is part of the
 
29
\fBsamba\fR(7)
 
30
suite.
 
31
.PP
 
32
The samba net utility is meant to work just like the net utility available for windows and DOS. The first argument should be used to specify the protocol to use when executing a certain command. ADS is used for ActiveDirectory, RAP is using for old (Win9x/NT3) clients and RPC can be used for NT4 and Windows 2000. If this argument is omitted, net will try to determine it automatically. Not all commands are available on all protocols.
39
33
.SH "OPTIONS"
40
 
 
41
 
.TP
42
 
\-h|\-\-help
43
 
Print a summary of command line options\&.
44
 
 
45
 
.TP
46
 
\-w target\-workgroup
47
 
Sets target workgroup or domain\&. You have to specify either this option or the IP address or the name of a server\&.
48
 
 
49
 
.TP
50
 
\-W workgroup
 
34
.TP 3n
 
35
-h|--help
 
36
Print a summary of command line options.
 
37
.TP 3n
 
38
-w target-workgroup
 
39
Sets target workgroup or domain. You have to specify either this option or the IP address or the name of a server.
 
40
.TP 3n
 
41
-W workgroup
51
42
Sets client workgroup or domain
52
 
 
53
 
.TP
54
 
\-U user
 
43
.TP 3n
 
44
-U user
55
45
User name to use
56
 
 
57
 
.TP
58
 
\-I ip\-address
59
 
IP address of target server to use\&. You have to specify either this option or a target workgroup or a target server\&.
60
 
 
61
 
.TP
62
 
\-p port
63
 
Port on the target server to connect to (usually 139 or 445)\&. Defaults to trying 445 first, then 139\&.
64
 
 
65
 
.TP
66
 
\-n <primary NetBIOS name>
67
 
This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the  parameter in the \fIsmb\&.conf\fR file\&. However, a command line setting will take precedence over settings in \fIsmb\&.conf\fR\&.
68
 
 
69
 
.TP
70
 
\-s <configuration file>
71
 
The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See \fIsmb\&.conf\fR for more information\&. The default configuration file name is determined at compile time\&.
72
 
 
73
 
.TP
74
 
\-S server
75
 
Name of target server\&. You should specify either this option or a target workgroup or a target IP address\&.
76
 
 
77
 
.TP
78
 
\-l
79
 
When listing data, give more information on each item\&.
80
 
 
81
 
.TP
82
 
\-P
83
 
Make queries to the external server using the machine account of the local server\&.
84
 
 
85
 
.TP
86
 
\-d|\-\-debuglevel=level
87
 
\fIlevel\fR is an integer from 0 to 10\&. The default value if this parameter is not specified is zero\&.
88
 
 
89
 
The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
90
 
 
91
 
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
92
 
 
93
 
Note that specifying this parameter here will override the  parameter in the \fIsmb\&.conf\fR file\&.
94
 
 
 
46
.TP 3n
 
47
-I ip-address
 
48
IP address of target server to use. You have to specify either this option or a target workgroup or a target server.
 
49
.TP 3n
 
50
-p port
 
51
Port on the target server to connect to (usually 139 or 445). Defaults to trying 445 first, then 139.
 
52
.TP 3n
 
53
-n <primary NetBIOS name>
 
54
This option allows you to override the NetBIOS name that Samba uses for itself. This is identical to setting the
 
55
 
 
56
parameter in the
 
57
\fIsmb.conf\fR
 
58
file. However, a command line setting will take precedence over settings in
 
59
\fIsmb.conf\fR.
 
60
.TP 3n
 
61
-s <configuration file>
 
62
The file specified contains the configuration details required by the server. The information in this file includes server-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide. See
 
63
\fIsmb.conf\fR
 
64
for more information. The default configuration file name is determined at compile time.
 
65
.TP 3n
 
66
-S server
 
67
Name of target server. You should specify either this option or a target workgroup or a target IP address.
 
68
.TP 3n
 
69
-l
 
70
When listing data, give more information on each item.
 
71
.TP 3n
 
72
-P
 
73
Make queries to the external server using the machine account of the local server.
 
74
.TP 3n
 
75
-d|--debuglevel=level
 
76
\fIlevel\fR
 
77
is an integer from 0 to 10. The default value if this parameter is not specified is zero.
 
78
.sp
 
79
The higher this value, the more detail will be logged to the log files about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 is a reasonable level for day-to-day running - it generates a small amount of information about operations carried out.
 
80
.sp
 
81
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic.
 
82
.sp
 
83
Note that specifying this parameter here will override the
 
84
 
 
85
parameter in the
 
86
\fIsmb.conf\fR
 
87
file.
95
88
.SH "COMMANDS"
96
 
 
97
89
.SS "CHANGESECRETPW"
98
 
 
99
 
.PP
100
 
This command allows the Samba machine account password to be set from an external application to a machine account password that has already been stored in Active Directory\&. DO NOT USE this command unless you know exactly what you are doing\&. The use of this command requires that the force flag (\-f) be used also\&. There will be NO command prompt\&. Whatever information is piped into stdin, either by typing at the command line or otherwise, will be stored as the literal machine password\&. Do NOT use this without care and attention as it will overwrite a legitimate machine password without warning\&. YOU HAVE BEEN WARNED\&.
101
 
 
102
 
.SS "TIME"
103
 
 
104
 
.PP
105
 
The \fBNET TIME\fR command allows you to view the time on a remote server or synchronise the time on the local server with the time on the remote server\&.
106
 
 
107
 
.SS "TIME"
108
 
 
109
 
.PP
110
 
Without any options, the \fBNET TIME\fR command displays the time on the remote server\&.
 
90
.PP
 
91
This command allows the Samba machine account password to be set from an external application to a machine account password that has already been stored in Active Directory. DO NOT USE this command unless you know exactly what you are doing. The use of this command requires that the force flag (-f) be used also. There will be NO command prompt. Whatever information is piped into stdin, either by typing at the command line or otherwise, will be stored as the literal machine password. Do NOT use this without care and attention as it will overwrite a legitimate machine password without warning. YOU HAVE BEEN WARNED.
 
92
.\" end of SS subsection "CHANGESECRETPW"
 
93
.SS "TIME"
 
94
.PP
 
95
The
 
96
\fBNET TIME\fR
 
97
command allows you to view the time on a remote server or synchronise the time on the local server with the time on the remote server.
 
98
 
 
99
.SS "TIME"
 
100
.PP
 
101
Without any options, the
 
102
\fBNET TIME\fR
 
103
command displays the time on the remote server.
111
104
 
112
105
.SS "TIME SYSTEM"
113
 
 
114
106
.PP
115
 
Displays the time on the remote server in a format ready for \fB/bin/date\fR
 
107
Displays the time on the remote server in a format ready for
 
108
\fB/bin/date\fR
116
109
 
117
110
.SS "TIME SET"
118
 
 
119
111
.PP
120
 
Tries to set the date and time of the local server to that on the remote server using \fB/bin/date\fR\&.
 
112
Tries to set the date and time of the local server to that on the remote server using
 
113
\fB/bin/date\fR.
121
114
 
122
115
.SS "TIME ZONE"
123
 
 
124
116
.PP
125
 
Displays the timezone in hours from GMT on the remote computer\&.
126
 
 
 
117
Displays the timezone in hours from GMT on the remote computer.
 
118
.\" end of SS subsection "TIME"
127
119
.SS "[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]"
128
 
 
129
 
.PP
130
 
Join a domain\&. If the account already exists on the server, and [TYPE] is MEMBER, the machine will attempt to join automatically\&. (Assuming that the machine has been created in server manager) Otherwise, a password will be prompted for, and a new account may be created\&.
131
 
 
132
 
.PP
133
 
[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain\&.
134
 
 
 
120
.PP
 
121
Join a domain. If the account already exists on the server, and [TYPE] is MEMBER, the machine will attempt to join automatically. (Assuming that the machine has been created in server manager) Otherwise, a password will be prompted for, and a new account may be created.
 
122
.PP
 
123
[TYPE] may be PDC, BDC or MEMBER to specify the type of server joining the domain.
 
124
.\" end of SS subsection "[RPC|ADS] JOIN [TYPE] [-U username[%password]] [options]"
135
125
.SS "[RPC] OLDJOIN [options]"
136
 
 
137
126
.PP
138
 
Join a domain\&. Use the OLDJOIN option to join the domain using the old style of domain joining \- you need to create a trust account in server manager first\&.
139
 
 
140
 
.SS "[RPC|ADS] USER"
141
 
 
142
 
.SS "[RPC|ADS] USER"
143
 
 
 
127
Join a domain. Use the OLDJOIN option to join the domain using the old style of domain joining - you need to create a trust account in server manager first.
 
128
.\" end of SS subsection "[RPC] OLDJOIN [options]"
 
129
.SS "[RPC|ADS] USER"
 
130
 
 
131
.SS "[RPC|ADS] USER"
144
132
.PP
145
133
List all users
146
134
 
147
135
.SS "[RPC|ADS] USER DELETE target"
148
 
 
149
136
.PP
150
137
Delete specified user
151
138
 
152
139
.SS "[RPC|ADS] USER INFO target"
153
 
 
154
140
.PP
155
 
List the domain groups of a the specified user\&.
 
141
List the domain groups of a the specified user.
156
142
 
157
143
.SS "[RPC|ADS] USER RENAME oldname newname"
158
 
 
159
144
.PP
160
 
Rename specified user\&.
 
145
Rename specified user.
161
146
 
162
147
.SS "[RPC|ADS] USER ADD name [password] [-F user flags] [-C comment]"
163
 
 
164
148
.PP
165
 
Add specified user\&.
166
 
 
 
149
Add specified user.
 
150
.\" end of SS subsection "[RPC|ADS] USER"
167
151
.SS "[RPC|ADS] GROUP"
168
152
 
169
153
.SS "[RPC|ADS] GROUP [misc options] [targets]"
170
 
 
171
154
.PP
172
 
List user groups\&.
 
155
List user groups.
173
156
 
174
157
.SS "[RPC|ADS] GROUP DELETE name [misc. options]"
175
 
 
176
158
.PP
177
 
Delete specified group\&.
 
159
Delete specified group.
178
160
 
179
161
.SS "[RPC|ADS] GROUP ADD name [-C comment]"
180
 
 
181
162
.PP
182
 
Create specified group\&.
183
 
 
 
163
Create specified group.
 
164
.\" end of SS subsection "[RPC|ADS] GROUP"
184
165
.SS "[RAP|RPC] SHARE"
185
166
 
186
167
.SS "[RAP|RPC] SHARE [misc. options] [targets]"
187
 
 
188
168
.PP
189
 
Enumerates all exported resources (network shares) on target server\&.
 
169
Enumerates all exported resources (network shares) on target server.
190
170
 
191
171
.SS "[RAP|RPC] SHARE ADD name=serverpath [-C comment] [-M maxusers] [targets]"
192
 
 
193
172
.PP
194
 
Adds a share from a server (makes the export active)\&. Maxusers specifies the number of users that can be connected to the share simultaneously\&.
 
173
Adds a share from a server (makes the export active). Maxusers specifies the number of users that can be connected to the share simultaneously.
195
174
 
196
175
.SS "SHARE DELETE sharenam"
197
 
 
198
 
.PP
199
 
Delete specified share\&.
200
 
 
201
 
.SS "[RPC|RAP] FILE"
202
 
 
203
 
.SS "[RPC|RAP] FILE"
204
 
 
205
 
.PP
206
 
List all open files on remote server\&.
 
176
.PP
 
177
Delete specified share.
 
178
.\" end of SS subsection "[RAP|RPC] SHARE"
 
179
.SS "[RPC|RAP] FILE"
 
180
 
 
181
.SS "[RPC|RAP] FILE"
 
182
.PP
 
183
List all open files on remote server.
207
184
 
208
185
.SS "[RPC|RAP] FILE CLOSE fileid"
209
 
 
210
186
.PP
211
 
Close file with specified \fIfileid\fR on remote server\&.
 
187
Close file with specified
 
188
\fIfileid\fR
 
189
on remote server.
212
190
 
213
191
.SS "[RPC|RAP] FILE INFO fileid"
214
 
 
215
192
.PP
216
 
Print information on specified \fIfileid\fR\&. Currently listed are: file\-id, username, locks, path, permissions\&.
 
193
Print information on specified
 
194
\fIfileid\fR. Currently listed are: file-id, username, locks, path, permissions.
217
195
 
218
196
.SS "[RAP|RPC] FILE USER"
219
 
 
220
 
.RS
221
 
.Sh "Note"
222
 
 
 
197
.sp
 
198
.it 1 an-trap
 
199
.nr an-no-space-flag 1
 
200
.nr an-break-flag 1
 
201
.br
 
202
\fBNote\fR
223
203
.PP
224
 
Currently NOT implemented\&.
225
 
 
226
 
.RE
227
 
 
 
204
Currently NOT implemented.
 
205
.\" end of SS subsection "[RPC|RAP] FILE"
228
206
.SS "SESSION"
229
207
 
230
208
.SS "RAP SESSION"
231
 
 
232
209
.PP
233
 
Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server\&.
 
210
Without any other options, SESSION enumerates all active SMB/CIFS sessions on the target server.
234
211
 
235
212
.SS "RAP SESSION DELETE|CLOSE CLIENT_NAME"
236
 
 
237
213
.PP
238
 
Close the specified sessions\&.
 
214
Close the specified sessions.
239
215
 
240
216
.SS "RAP SESSION INFO CLIENT_NAME"
241
 
 
242
217
.PP
243
 
Give a list with all the open files in specified session\&.
244
 
 
 
218
Give a list with all the open files in specified session.
 
219
.\" end of SS subsection "SESSION"
245
220
.SS "RAP SERVER DOMAIN"
246
 
 
247
221
.PP
248
 
List all servers in specified domain or workgroup\&. Defaults to local domain\&.
249
 
 
 
222
List all servers in specified domain or workgroup. Defaults to local domain.
 
223
.\" end of SS subsection "RAP SERVER DOMAIN"
250
224
.SS "RAP DOMAIN"
251
 
 
252
225
.PP
253
 
Lists all domains and workgroups visible on the current network\&.
254
 
 
 
226
Lists all domains and workgroups visible on the current network.
 
227
.\" end of SS subsection "RAP DOMAIN"
255
228
.SS "RAP PRINTQ"
256
229
 
257
230
.SS "RAP PRINTQ LIST QUEUE_NAME"
258
 
 
259
231
.PP
260
 
Lists the specified print queue and print jobs on the server\&. If the \fIQUEUE_NAME\fR is omitted, all queues are listed\&.
 
232
Lists the specified print queue and print jobs on the server. If the
 
233
\fIQUEUE_NAME\fR
 
234
is omitted, all queues are listed.
261
235
 
262
236
.SS "RAP PRINTQ DELETE JOBID"
263
 
 
264
237
.PP
265
 
Delete job with specified id\&.
266
 
 
 
238
Delete job with specified id.
 
239
.\" end of SS subsection "RAP PRINTQ"
267
240
.SS "RAP VALIDATE user [password]"
268
 
 
269
 
.PP
270
 
Validate whether the specified user can log in to the remote server\&. If the password is not specified on the commandline, it will be prompted\&.
271
 
 
272
 
.RS
273
 
.Sh "Note"
274
 
 
275
 
.PP
276
 
Currently NOT implemented\&.
277
 
 
278
 
.RE
279
 
 
 
241
.PP
 
242
Validate whether the specified user can log in to the remote server. If the password is not specified on the commandline, it will be prompted.
 
243
.sp
 
244
.it 1 an-trap
 
245
.nr an-no-space-flag 1
 
246
.nr an-break-flag 1
 
247
.br
 
248
\fBNote\fR
 
249
.PP
 
250
Currently NOT implemented.
 
251
.\" end of SS subsection "RAP VALIDATE user [password]"
280
252
.SS "RAP GROUPMEMBER"
281
253
 
282
254
.SS "RAP GROUPMEMBER LIST GROUP"
283
 
 
284
255
.PP
285
 
List all members of the specified group\&.
 
256
List all members of the specified group.
286
257
 
287
258
.SS "RAP GROUPMEMBER DELETE GROUP USER"
288
 
 
289
259
.PP
290
 
Delete member from group\&.
 
260
Delete member from group.
291
261
 
292
262
.SS "RAP GROUPMEMBER ADD GROUP USER"
293
 
 
294
263
.PP
295
 
Add member to group\&.
296
 
 
 
264
Add member to group.
 
265
.\" end of SS subsection "RAP GROUPMEMBER"
297
266
.SS "RAP ADMIN command"
298
 
 
299
 
.PP
300
 
Execute the specified \fIcommand\fR on the remote server\&. Only works with OS/2 servers\&.
301
 
 
302
 
.RS
303
 
.Sh "Note"
304
 
 
305
 
.PP
306
 
Currently NOT implemented\&.
307
 
 
308
 
.RE
309
 
 
 
267
.PP
 
268
Execute the specified
 
269
\fIcommand\fR
 
270
on the remote server. Only works with OS/2 servers.
 
271
.sp
 
272
.it 1 an-trap
 
273
.nr an-no-space-flag 1
 
274
.nr an-break-flag 1
 
275
.br
 
276
\fBNote\fR
 
277
.PP
 
278
Currently NOT implemented.
 
279
.\" end of SS subsection "RAP ADMIN command"
310
280
.SS "RAP SERVICE"
311
281
 
312
282
.SS "RAP SERVICE START NAME [arguments...]"
313
 
 
314
 
.PP
315
 
Start the specified service on the remote server\&. Not implemented yet\&.
316
 
 
317
 
.RS
318
 
.Sh "Note"
319
 
 
320
 
.PP
321
 
Currently NOT implemented\&.
322
 
 
323
 
.RE
 
283
.PP
 
284
Start the specified service on the remote server. Not implemented yet.
 
285
.sp
 
286
.it 1 an-trap
 
287
.nr an-no-space-flag 1
 
288
.nr an-break-flag 1
 
289
.br
 
290
\fBNote\fR
 
291
.PP
 
292
Currently NOT implemented.
324
293
 
325
294
.SS "RAP SERVICE STOP"
326
 
 
327
 
.PP
328
 
Stop the specified service on the remote server\&.
329
 
 
330
 
.RS
331
 
.Sh "Note"
332
 
 
333
 
.PP
334
 
Currently NOT implemented\&.
335
 
 
336
 
.RE
337
 
 
 
295
.PP
 
296
Stop the specified service on the remote server.
 
297
.sp
 
298
.it 1 an-trap
 
299
.nr an-no-space-flag 1
 
300
.nr an-break-flag 1
 
301
.br
 
302
\fBNote\fR
 
303
.PP
 
304
Currently NOT implemented.
 
305
.\" end of SS subsection "RAP SERVICE"
338
306
.SS "RAP PASSWORD USER OLDPASS NEWPASS"
339
 
 
340
307
.PP
341
 
Change password of \fIUSER\fR from \fIOLDPASS\fR to \fINEWPASS\fR\&.
342
 
 
 
308
Change password of
 
309
\fIUSER\fR
 
310
from
 
311
\fIOLDPASS\fR
 
312
to
 
313
\fINEWPASS\fR.
 
314
.\" end of SS subsection "RAP PASSWORD USER OLDPASS NEWPASS"
343
315
.SS "LOOKUP"
344
316
 
345
317
.SS "LOOKUP HOST HOSTNAME [TYPE]"
346
 
 
347
318
.PP
348
 
Lookup the IP address of the given host with the specified type (netbios suffix)\&. The type defaults to 0x20 (workstation)\&.
 
319
Lookup the IP address of the given host with the specified type (netbios suffix). The type defaults to 0x20 (workstation).
349
320
 
350
321
.SS "LOOKUP LDAP [DOMAIN"
351
 
 
352
322
.PP
353
 
Give IP address of LDAP server of specified \fIDOMAIN\fR\&. Defaults to local domain\&.
 
323
Give IP address of LDAP server of specified
 
324
\fIDOMAIN\fR. Defaults to local domain.
354
325
 
355
326
.SS "LOOKUP KDC [REALM]"
356
 
 
357
327
.PP
358
 
Give IP address of KDC for the specified \fIREALM\fR\&. Defaults to local realm\&.
 
328
Give IP address of KDC for the specified
 
329
\fIREALM\fR. Defaults to local realm.
359
330
 
360
331
.SS "LOOKUP DC [DOMAIN]"
361
 
 
362
332
.PP
363
 
Give IP's of Domain Controllers for specified \fI DOMAIN\fR\&. Defaults to local domain\&.
 
333
Give IP's of Domain Controllers for specified
 
334
\fI DOMAIN\fR. Defaults to local domain.
364
335
 
365
336
.SS "LOOKUP MASTER DOMAIN"
366
 
 
367
337
.PP
368
 
Give IP of master browser for specified \fIDOMAIN\fR or workgroup\&. Defaults to local domain\&.
369
 
 
 
338
Give IP of master browser for specified
 
339
\fIDOMAIN\fR
 
340
or workgroup. Defaults to local domain.
 
341
.\" end of SS subsection "LOOKUP"
370
342
.SS "CACHE"
371
 
 
372
 
.PP
373
 
Samba uses a general caching interface called 'gencache'\&. It can be controlled using 'NET CACHE'\&.
374
 
 
375
 
.PP
376
 
All the timeout parameters support the suffixes: 
377
 
s \- Secondsm \- Minutesh \- Hoursd \- Daysw \- Weeks 
 
343
.PP
 
344
Samba uses a general caching interface called 'gencache'. It can be controlled using 'NET CACHE'.
 
345
.PP
 
346
All the timeout parameters support the suffixes:
 
347
.IP "" 3n
 
348
s - Seconds
 
349
.IP "" 3n
 
350
m - Minutes
 
351
.IP "" 3n
 
352
h - Hours
 
353
.IP "" 3n
 
354
d - Days
 
355
.IP "" 3n
 
356
w - Weeks
 
357
 
378
358
 
379
359
.SS "CACHE ADD key data time-out"
380
 
 
381
360
.PP
382
 
Add specified key+data to the cache with the given timeout\&.
 
361
Add specified key+data to the cache with the given timeout.
383
362
 
384
363
.SS "CACHE DEL key"
385
 
 
386
364
.PP
387
 
Delete key from the cache\&.
 
365
Delete key from the cache.
388
366
 
389
367
.SS "CACHE SET key data time-out"
390
 
 
391
368
.PP
392
 
Update data of existing cache entry\&.
 
369
Update data of existing cache entry.
393
370
 
394
371
.SS "CACHE SEARCH PATTERN"
395
 
 
396
372
.PP
397
 
Search for the specified pattern in the cache data\&.
 
373
Search for the specified pattern in the cache data.
398
374
 
399
375
.SS "CACHE LIST"
400
 
 
401
376
.PP
402
 
List all current items in the cache\&.
 
377
List all current items in the cache.
403
378
 
404
379
.SS "CACHE FLUSH"
405
 
 
406
380
.PP
407
 
Remove all the current items from the cache\&.
408
 
 
 
381
Remove all the current items from the cache.
 
382
.\" end of SS subsection "CACHE"
409
383
.SS "GETLOCALSID [DOMAIN]"
410
 
 
411
384
.PP
412
 
Print the SID of the specified domain, or if the parameter is omitted, the SID of the domain the local server is in\&.
413
 
 
 
385
Print the SID of the specified domain, or if the parameter is omitted, the SID of the domain the local server is in.
 
386
.\" end of SS subsection "GETLOCALSID [DOMAIN]"
414
387
.SS "SETLOCALSID S-1-5-21-x-y-z"
415
 
 
416
388
.PP
417
 
Sets domain sid for the local server to the specified SID\&.
418
 
 
 
389
Sets domain sid for the local server to the specified SID.
 
390
.\" end of SS subsection "SETLOCALSID S-1-5-21-x-y-z"
419
391
.SS "GROUPMAP"
420
 
 
421
392
.PP
422
 
Manage the mappings between Windows group SIDs and UNIX groups\&. Parameters take the for "parameter=value"\&. Common options include:
423
 
 
424
 
.TP 3
425
 
\(bu
426
 
unixgroup \- Name of the UNIX group
427
 
.TP
428
 
\(bu
429
 
ntgroup \- Name of the Windows NT group (must be resolvable to a SID
430
 
.TP
431
 
\(bu
432
 
rid \- Unsigned 32\-bit integer
433
 
.TP
434
 
\(bu
435
 
sid \- Full SID in the form of "S\-1\-\&.\&.\&."
436
 
.TP
437
 
\(bu
438
 
type \- Type of the group; either 'domain', 'local', or 'builtin'
439
 
.TP
440
 
\(bu
441
 
comment \- Freeform text description of the group
442
 
.LP
 
393
Manage the mappings between Windows group SIDs and UNIX groups. Parameters take the for "parameter=value". Common options include:
 
394
.TP 3n
 
395
&#8226;
 
396
unixgroup - Name of the UNIX group
 
397
.TP 3n
 
398
&#8226;
 
399
ntgroup - Name of the Windows NT group (must be resolvable to a SID
 
400
.TP 3n
 
401
&#8226;
 
402
rid - Unsigned 32-bit integer
 
403
.TP 3n
 
404
&#8226;
 
405
sid - Full SID in the form of "S-1-..."
 
406
.TP 3n
 
407
&#8226;
 
408
type - Type of the group; either 'domain', 'local', or 'builtin'
 
409
.TP 3n
 
410
&#8226;
 
411
comment - Freeform text description of the group
 
412
.sp
 
413
.RE
443
414
 
444
415
.SS "GROUPMAP ADD"
445
 
 
446
416
.PP
447
 
Add a new group mapping entry: 
 
417
Add a new group mapping entry:
 
418
 
 
419
.sp
448
420
.nf
449
421
 
450
 
net groupmap add {rid=int|sid=string} unixgroup=string \\
 
422
net groupmap add {rid=int|sid=string} unixgroup=string \
451
423
      [type={domain|local}] [ntgroup=string] [comment=string]
452
424
.fi
453
 
 
 
425
 
454
426
 
455
427
.SS "GROUPMAP DELETE"
456
 
 
457
428
.PP
458
 
Delete a group mapping entry\&. If more then one group name matches, the first entry found is deleted\&.
459
 
 
 
429
Delete a group mapping entry. If more then one group name matches, the first entry found is deleted.
460
430
.PP
461
431
net groupmap delete {ntgroup=string|sid=SID}
462
432
 
463
433
.SS "GROUPMAP MODIFY"
464
 
 
465
434
.PP
466
435
Update en existing group entry
467
 
 
468
436
.PP
469
 
 
 
437
 
 
438
 
 
439
.sp
470
440
.nf
471
441
 
472
 
net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \\
 
442
net groupmap modify {ntgroup=string|sid=SID} [unixgroup=string] \
473
443
       [comment=string] [type={domain|local}]
474
444
.fi
475
 
 
 
445
 
476
446
 
477
447
.SS "GROUPMAP LIST"
478
 
 
479
448
.PP
480
449
List existing group mapping entries
481
 
 
482
450
.PP
483
451
net groupmap list [verbose] [ntgroup=string] [sid=SID]
484
 
 
 
452
.\" end of SS subsection "GROUPMAP"
485
453
.SS "MAXRID"
486
 
 
487
454
.PP
488
 
Prints out the highest RID currently in use on the local server (by the active 'passdb backend')\&.
489
 
 
 
455
Prints out the highest RID currently in use on the local server (by the active 'passdb backend').
 
456
.\" end of SS subsection "MAXRID"
490
457
.SS "RPC INFO"
491
 
 
492
458
.PP
493
 
Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups\&.
494
 
 
 
459
Print information about the domain of the remote server, such as domain name, domain sid and number of users and groups.
 
460
.\" end of SS subsection "RPC INFO"
495
461
.SS "[RPC|ADS] TESTJOIN"
496
 
 
497
462
.PP
498
 
Check whether participation in a domain is still valid\&.
499
 
 
 
463
Check whether participation in a domain is still valid.
 
464
.\" end of SS subsection "[RPC|ADS] TESTJOIN"
500
465
.SS "[RPC|ADS] CHANGETRUSTPW"
501
 
 
502
466
.PP
503
 
Force change of domain trust password\&.
504
 
 
 
467
Force change of domain trust password.
 
468
.\" end of SS subsection "[RPC|ADS] CHANGETRUSTPW"
505
469
.SS "RPC TRUSTDOM"
506
470
 
507
471
.SS "RPC TRUSTDOM ADD DOMAIN"
508
 
 
509
472
.PP
510
 
Add a interdomain trust account for \fIDOMAIN\fR to the remote server\&.
 
473
Add a interdomain trust account for
 
474
\fIDOMAIN\fR
 
475
to the remote server.
511
476
 
512
477
.SS "RPC TRUSTDOM DEL DOMAIM"
513
 
 
514
 
.PP
515
 
Remove interdomain trust account for \fIDOMAIN\fR from the remote server\&.
516
 
 
517
 
.RS
518
 
.Sh "Note"
519
 
 
520
 
.PP
521
 
Currently NOT implemented\&.
522
 
 
523
 
.RE
 
478
.PP
 
479
Remove interdomain trust account for
 
480
\fIDOMAIN\fR
 
481
from the remote server.
 
482
.sp
 
483
.it 1 an-trap
 
484
.nr an-no-space-flag 1
 
485
.nr an-break-flag 1
 
486
.br
 
487
\fBNote\fR
 
488
.PP
 
489
Currently NOT implemented.
524
490
 
525
491
.SS "RPC TRUSTDOM ESTABLISH DOMAIN"
526
 
 
527
492
.PP
528
 
Establish a trust relationship to a trusting domain\&. Interdomain account must already be created on the remote PDC\&.
 
493
Establish a trust relationship to a trusting domain. Interdomain account must already be created on the remote PDC.
529
494
 
530
495
.SS "RPC TRUSTDOM REVOKE DOMAIN"
531
 
 
532
496
.PP
533
497
Abandon relationship to trusted domain
534
498
 
535
499
.SS "RPC TRUSTDOM LIST"
536
 
 
537
500
.PP
538
 
List all current interdomain trust relationships\&.
 
501
List all current interdomain trust relationships.
539
502
 
540
503
.SS "RPC RIGHTS"
541
 
 
542
504
.PP
543
 
This subcommand is used to view and manage Samba's rights assignments (also referred to as privileges)\&. There are three options current available: \fIlist\fR, \fIgrant\fR, and \fIrevoke\fR\&. More details on Samba's privilege model and its use can be found in the Samba\-HOWTO\-Collection\&.
544
 
 
 
505
This subcommand is used to view and manage Samba's rights assignments (also referred to as privileges). There are three options current available:
 
506
\fIlist\fR,
 
507
\fIgrant\fR, and
 
508
\fIrevoke\fR. More details on Samba's privilege model and its use can be found in the Samba-HOWTO-Collection.
 
509
.\" end of SS subsection "RPC TRUSTDOM"
545
510
.SS "RPC ABORTSHUTDOWN"
546
 
 
547
511
.PP
548
 
Abort the shutdown of a remote server\&.
549
 
 
 
512
Abort the shutdown of a remote server.
 
513
.\" end of SS subsection "RPC ABORTSHUTDOWN"
550
514
.SS "SHUTDOWN [-t timeout] [-r] [-f] [-C message]"
551
 
 
552
 
.PP
553
 
Shut down the remote server\&.
554
 
 
555
 
.TP
556
 
\-r
557
 
Reboot after shutdown\&.
558
 
 
559
 
.TP
560
 
\-f
561
 
Force shutting down all applications\&.
562
 
 
563
 
.TP
564
 
\-t timeout
565
 
Timeout before system will be shut down\&. An interactive user of the system can use this time to cancel the shutdown\&.
566
 
 
567
 
.TP
568
 
\-C message
569
 
Display the specified message on the screen to announce the shutdown\&.
570
 
 
571
 
.SS "SAMDUMP"
572
 
 
573
 
.PP
574
 
Print out sam database of remote server\&. You need to run this on either a BDC\&.
575
 
 
576
 
.SS "VAMPIRE"
577
 
 
578
 
.PP
579
 
Export users, aliases and groups from remote server to local server\&. Can only be run an a BDC\&.
580
 
 
581
 
.SS "GETSID"
582
 
 
583
 
.PP
584
 
Fetch domain SID and store it in the local \fIsecrets\&.tdb\fR\&.
585
 
 
 
515
.PP
 
516
Shut down the remote server.
 
517
.TP 3n
 
518
-r
 
519
Reboot after shutdown.
 
520
.TP 3n
 
521
-f
 
522
Force shutting down all applications.
 
523
.TP 3n
 
524
-t timeout
 
525
Timeout before system will be shut down. An interactive user of the system can use this time to cancel the shutdown.
 
526
'>
 
527
 
 
528
.TP 3n
 
529
-C message
 
530
Display the specified message on the screen to announce the shutdown.
 
531
.\" end of SS subsection "SHUTDOWN [-t timeout] [-r] [-f] [-C message]"
 
532
.SS "RPC SAMDUMP"
 
533
.PP
 
534
Print out sam database of remote server. You need to run this on either a BDC or a PDC.
 
535
 
 
536
.\" end of SS subsection "RPC SAMDUMP"
 
537
.SS "RPC VAMPIRE"
 
538
.PP
 
539
Export users, aliases and groups from remote server to local server. Can only be run an a BDC.
 
540
.\" end of SS subsection "RPC VAMPIRE"
 
541
.SS "RPC GETSID"
 
542
.PP
 
543
Fetch domain SID and store it in the local
 
544
\fIsecrets.tdb\fR.
 
545
.\" end of SS subsection "RPC GETSID"
586
546
.SS "ADS LEAVE"
587
 
 
588
547
.PP
589
 
Make the remote host leave the domain it is part of\&.
590
 
 
 
548
Make the remote host leave the domain it is part of.
 
549
.\" end of SS subsection "ADS LEAVE"
591
550
.SS "ADS STATUS"
592
 
 
593
551
.PP
594
 
Print out status of machine account of the local machine in ADS\&. Prints out quite some debug info\&. Aimed at developers, regular users should use \fBNET ADS TESTJOIN\fR\&.
595
 
 
 
552
Print out status of machine account of the local machine in ADS. Prints out quite some debug info. Aimed at developers, regular users should use
 
553
\fBNET ADS TESTJOIN\fR.
 
554
.\" end of SS subsection "ADS STATUS"
596
555
.SS "ADS PRINTER"
597
556
 
598
557
.SS "ADS PRINTER INFO [PRINTER] [SERVER]"
599
 
 
600
558
.PP
601
 
Lookup info for \fIPRINTER\fR on \fISERVER\fR\&. The printer name defaults to "*", the server name defaults to the local host\&.
 
559
Lookup info for
 
560
\fIPRINTER\fR
 
561
on
 
562
\fISERVER\fR. The printer name defaults to "*", the server name defaults to the local host.
602
563
 
603
564
.SS "ADS PRINTER PUBLISH PRINTER"
604
 
 
605
565
.PP
606
 
Publish specified printer using ADS\&.
 
566
Publish specified printer using ADS.
607
567
 
608
568
.SS "ADS PRINTER REMOVE PRINTER"
609
 
 
610
569
.PP
611
 
Remove specified printer from ADS directory\&.
612
 
 
 
570
Remove specified printer from ADS directory.
 
571
.\" end of SS subsection "ADS PRINTER"
613
572
.SS "ADS SEARCH EXPRESSION ATTRIBUTES..."
614
 
 
615
 
.PP
616
 
Perform a raw LDAP search on a ADS server and dump the results\&. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results\&.
617
 
 
618
 
.PP
619
 
Example: \fBnet ads search '(objectCategory=group)' sAMAccountName\fR 
620
 
 
 
573
.PP
 
574
Perform a raw LDAP search on a ADS server and dump the results. The expression is a standard LDAP search expression, and the attributes are a list of LDAP fields to show in the results.
 
575
.PP
 
576
Example:
 
577
\fBnet ads search '(objectCategory=group)' sAMAccountName\fR
 
578
.\" end of SS subsection "ADS SEARCH EXPRESSION ATTRIBUTES..."
621
579
.SS "ADS DN DN (attributes)"
622
 
 
623
 
.PP
624
 
Perform a raw LDAP search on a ADS server and dump the results\&. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result\&.
625
 
 
626
 
.PP
627
 
Example: \fBnet ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName\fR
628
 
 
629
 
.SS "WORKGROUP"
630
 
 
631
 
.PP
632
 
Print out workgroup name for specified kerberos realm\&.
633
 
 
 
580
.PP
 
581
Perform a raw LDAP search on a ADS server and dump the results. The DN standard LDAP DN, and the attributes are a list of LDAP fields to show in the result.
 
582
.PP
 
583
Example:
 
584
\fBnet ads dn 'CN=administrator,CN=Users,DC=my,DC=domain' SAMAccountName\fR
 
585
.\" end of SS subsection "ADS DN DN (attributes)"
 
586
.SS "ADS WORKGROUP"
 
587
.PP
 
588
Print out workgroup name for specified kerberos realm.
 
589
.\" end of SS subsection "ADS WORKGROUP"
 
590
.SS "USERSHARE"
 
591
.PP
 
592
Starting with version 3.0.23, a Samba server now supports the ability for non-root users to add user define shares to be exported using the "net usershare" commands.
 
593
.PP
 
594
To set this up, first set up your smb.conf by adding to the [global] section : usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops". Set the permissions on /usr/local/samba/lib/usershares to 01770. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file). Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb.conf a line such as : usershare max shares = 100. To allow 100 usershare definitions. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below.
 
595
.PP
 
596
The usershare commands are:
 
597
.IP "" 3n
 
598
net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.
 
599
.IP "" 3n
 
600
net usershare delete sharename - to delete a user defined share.
 
601
.IP "" 3n
 
602
net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.
 
603
.IP "" 3n
 
604
net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.
 
605
 
 
606
 
 
607
.SS "USERSHARE ADD sharename path [comment] [acl] [guest_ok=[y|n]]"
 
608
.PP
 
609
Add or replace a new user defined share, with name "sharename".
 
610
.PP
 
611
"path" specifies the absolute pathname on the system to be exported. Restrictions may be put on this, see the global smb.conf parameters : "usershare owner only", "usershare prefix allow list", and "usershare prefix deny list".
 
612
.PP
 
613
The optional "comment" parameter is the comment that will appear on the share when browsed to by a client.
 
614
.PP
 
615
The optional "acl" field specifies which users have read and write access to the entire share. Note that guest connections are not allowed unless the smb.conf parameter "usershare allow guests" has been set. The definition of a user defined share acl is : "user:permission", where user is a valid username on the system and permission can be "F", "R", or "D". "F" stands for "full permissions", ie. read and write permissions. "D" stands for "deny" for a user, ie. prevent this user from accessing this share. "R" stands for "read only", ie. only allow read access to this share (no creation of new files or directories or writing to files).
 
616
.PP
 
617
The default if no "acl" is given is "Everyone:R", which means any authenticated user has read-only access.
 
618
.PP
 
619
The optional "guest_ok" has the same effect as the parameter of the same name in smb.conf, in that it allows guest access to this user defined share. This parameter is only allowed if the global parameter "usershare allow guests" has been set to true in the smb.conf.
 
620
 
 
621
 
 
622
There is no separate command to modify an existing user defined share,
 
623
just use the "net usershare add [sharename]" command using the same
 
624
sharename as the one you wish to modify and specify the new options
 
625
you wish. The Samba smbd daemon notices user defined share modifications
 
626
at connect time so will see the change immediately, there is no need
 
627
to restart smbd on adding, deleting or changing a user defined share.
 
628
 
 
629
.SS "USERSHARE DELETE sharename"
 
630
.PP
 
631
Deletes the user defined share by name. The Samba smbd daemon immediately notices this change, although it will not disconnect any users currently connected to the deleted share.
 
632
 
 
633
.SS "USERSHARE INFO [-l|--long] [wildcard sharename]"
 
634
.PP
 
635
Get info on user defined shares owned by the current user matching the given pattern, or all users.
 
636
.PP
 
637
net usershare info on its own dumps out info on the user defined shares that were created by the current user, or restricts them to share names that match the given wildcard pattern ('*' matches one or more characters, '?' matches only one character). If the '-l' or '--long' option is also given, it prints out info on user defined shares created by other users.
 
638
.PP
 
639
The information given about a share looks like : [foobar] path=/home/jeremy comment=testme usershare_acl=Everyone:F guest_ok=n And is a list of the current settings of the user defined share that can be modified by the "net usershare add" command.
 
640
 
 
641
.SS "USERSHARE LIST [-l|--long] wildcard sharename"
 
642
.PP
 
643
List all the user defined shares owned by the current user matching the given pattern, or all users.
 
644
.PP
 
645
net usershare list on its own list out the names of the user defined shares that were created by the current user, or restricts the list to share names that match the given wildcard pattern ('*' matches one or more characters, '?' matches only one character). If the '-l' or '--long' option is also given, it includes the names of user defined shares created by other users.
 
646
.\" end of SS subsection "USERSHARE"
634
647
.SS "HELP [COMMAND]"
635
 
 
636
648
.PP
637
 
Gives usage information for the specified command\&.
638
 
 
 
649
Gives usage information for the specified command.
 
650
.\" end of SS subsection "HELP [COMMAND]"
639
651
.SH "VERSION"
640
 
 
641
652
.PP
642
 
This man page is complete for version 3\&.0 of the Samba suite\&.
643
 
 
 
653
This man page is complete for version 3.0 of the Samba suite.
644
654
.SH "AUTHOR"
645
 
 
646
 
.PP
647
 
The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
648
 
 
649
 
.PP
650
 
The net manpage was written by Jelmer Vernooij\&.
 
655
.PP
 
656
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.
 
657
.PP
 
658
The net manpage was written by Jelmer Vernooij.
651
659