Merge illumos-gate
[unleashed.git] / share / man / man8 / smbadm.8
blobbaa74dd917cf29d1ceb786127a2e2bd734a397bf
1 '\" te
2 .\" Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
3 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH SMBADM 8 "April 9, 2016"
8 .SH NAME
9 smbadm \- configure and manage CIFS local groups and users, and manage domain
10 membership
11 .SH SYNOPSIS
12 .LP
13 .nf
14 \fBsmbadm add-member\fR -m \fImember\fR [[-m \fImember\fR] \&.\|.\|.] \fIgroup\fR
15 .fi
17 .LP
18 .nf
19 \fBsmbadm create\fR [-d \fIdescription\fR] \fIgroup\fR
20 .fi
22 .LP
23 .nf
24 \fBsmbadm delete\fR \fIgroup\fR
25 .fi
27 .LP
28 .nf
29 \fBsmbadm disable-user\fR \fIusername\fR
30 .fi
32 .LP
33 .nf
34 \fBsmbadm enable-user\fR \fIusername\fR
35 .fi
37 .LP
38 .nf
39 \fBsmbadm get\fR [[-p \fIproperty\fR] \&.\|.\|.] \fIgroup\fR
40 .fi
42 .LP
43 .nf
44 \fBsmbadm join\fR [-y] -u \fIusername\fR \fIdomain\fR
45 .fi
47 .LP
48 .nf
49 \fBsmbadm join\fR [-y] -w \fIworkgroup\fR
50 .fi
52 .LP
53 .nf
54 \fBsmbadm list\fR
55 .fi
57 .LP
58 .nf
59 \fBsmbadm lookup\fR \fIaccount-name\fR [\fIaccount-name\fR [\&.\|.\|.]]
60 .fi
62 .LP
63 .nf
64 \fBsmbadm remove-member\fR -m \fImember\fR [[-m \fImember\fR] \&.\|.\|.] \fIgroup\fR
65 .fi
67 .LP
68 .nf
69 \fBsmbadm rename\fR \fIgroup\fR \fInew-group\fR
70 .fi
72 .LP
73 .nf
74 \fBsmbadm set\fR -p \fIproperty\fR=\fIvalue\fR [[-p \fIproperty\fR=\fIvalue\fR] \&.\|.\|.] \fIgroup\fR
75 .fi
77 .LP
78 .nf
79 \fBsmbadm show\fR [-m] [-p] [\fIgroup\fR]
80 .fi
82 .SH DESCRIPTION
83 .LP
84 The \fBsmbadm\fR command is used to configure \fBCIFS\fR local groups and to
85 manage domain membership. You can also use the \fBsmbadm\fR command to enable
86 or disable SMB password generation for individual local users.
87 .sp
88 .LP
89 \fBCIFS\fR local groups can be used when Windows accounts must be members of
90 some local groups and when Windows style privileges must be granted. Solaris
91 local groups cannot provide these functions.
92 .sp
93 .LP
94 There are two types of local groups: user defined and built-in. Built-in local
95 groups are predefined local groups to support common administration tasks.
96 .sp
97 .LP
98 In order to provide proper identity mapping between \fBCIFS\fR local groups and
99 Solaris groups, a \fBCIFS\fR local group must have a corresponding Solaris
100 group. This requirement has two consequences: first, the group name must
101 conform to the intersection of the Windows and Solaris group name rules. Thus,
102 a \fBCIFS\fR local group name can be up to eight (8) characters long and
103 contain only lowercase characters and numbers. Second, a Solaris local group
104 has to be created before a \fBCIFS\fR local group can be created.
107 Built-in groups are standard Windows groups and are predefined by the
108 \fBCIFS\fR service. The built-in groups cannot be added, removed, or renamed,
109 and these groups do not follow the \fBCIFS\fR local group naming conventions.
112 When the \fBCIFS\fR server is started, the following built-in groups are
113 available:
115 .ne 2
117 \fBAdministrators\fR
119 .sp .6
120 .RS 4n
121 Group members can administer the system.
125 .ne 2
127 \fBBackup Operators\fR
129 .sp .6
130 .RS 4n
131 Group members can bypass file access controls to back up and restore files.
135 .ne 2
137 \fBPower Users\fR
139 .sp .6
140 .RS 4n
141 Group members can share directories.
146 Solaris local users must have an SMB password for authentication and to gain
147 access to CIFS resources. This password is created by using the \fBpasswd\fR(1)
148 command when the \fBpam_smb_password\fR module is added to the system's PAM
149 configuration. See the \fBpam_smb_passwd\fR(5) man page.
152 The \fBdisable-user\fR and \fBenable-user\fR subcommands control SMB
153 password-generation for a specified local user. When disabled, the user is
154 prevented from connecting to the Solaris CIFS service. By default, SMB
155 password-generation is enabled for all local users.
158 To reenable a disabled user, you must use the \fBenable-user\fR subcommand and
159 then reset the user's password by using the \fBpasswd\fR command. The
160 \fBpam_smb_passwd.so.1\fR module must be added to the system's PAM
161 configuration to generate an SMB password.
162 .SS "Escaping Backslash Character"
164 For the \fBadd-member\fR, \fBremove-member\fR, and \fBjoin\fR (with \fB-u\fR)
165 subcommands, the backslash character (\fB\e\fR) is a valid separator between
166 member or user names and domain names. The backslash character is a shell
167 special character and must be quoted. For example, you might escape the
168 backslash character with another backslash character:
169 \fIdomain\fR\fB\e\e\fR\fIusername\fR. For more information about handling shell
170 special characters, see the man page for your shell.
171 .SH OPERANDS
173 The \fBsmbadm\fR command uses the following operands:
175 .ne 2
177 \fB\fIdomain\fR\fR
179 .sp .6
180 .RS 4n
181 Specifies the name of an existing Windows domain to join.
185 .ne 2
187 \fB\fIgroup\fR\fR
189 .sp .6
190 .RS 4n
191 Specifies the name of the \fBCIFS\fR local group.
195 .ne 2
197 \fB\fIusername\fR\fR
199 .sp .6
200 .RS 4n
201 Specifies the name of a Solaris local user.
204 .SH SUBCOMMANDS
206 The \fBsmbadm\fR command includes these subcommands:
208 .ne 2
210 \fB\fBadd-member\fR -m \fImember\fR [[-m \fImember\fR] \&.\|.\|.]
211 \fIgroup\fR\fR
213 .sp .6
214 .RS 4n
215 Adds the specified member to the specified \fBCIFS\fR local group. The \fB-m\fR
216 \fImember\fR option specifies the name of a \fBCIFS\fR local group member. The
217 member name must include an existing user name and an optional domain name.
219 Specify the member name in either of the following formats:
221 .in +2
223 [\fIdomain\fR\e]\fIusername\fR
224 [\fIdomain\fR/]\fIusername\fR
226 .in -2
229 For example, a valid member name might be \fBsales\eterry\fR or
230 \fBsales/terry\fR, where \fBsales\fR is the Windows domain name and \fBterry\fR
231 is the name of a user in the \fBsales\fR domain.
235 .ne 2
237 \fB\fBcreate\fR [\fB-d\fR \fIdescription\fR] \fIgroup\fR\fR
239 .sp .6
240 .RS 4n
241 Creates a \fBCIFS\fR local group with the specified name. You can optionally
242 specify a description of the group by using the \fB-d\fR option.
246 .ne 2
248 \fB\fBdelete\fR \fIgroup\fR\fR
250 .sp .6
251 .RS 4n
252 Deletes the specified \fBCIFS\fR local group. The built-in groups cannot be
253 deleted.
257 .ne 2
259 \fB\fBdisable\fR \fIusername\fR\fR
261 .sp .6
262 .RS 4n
263 Disables SMB password-generation capabilities for the specified local user. A
264 disabled local user is prevented from accessing the system by means of the CIFS
265 service. When a local user account is disabled, you cannot use the \fBpasswd\fR
266 command to modify the user's SMB password until the user account is reenabled.
270 .ne 2
272 \fB\fBenable\fR \fIusername\fR\fR
274 .sp .6
275 .RS 4n
276 Enables SMB password-generation capabilities for the specified local user.
277 After the password-generation capabilities are reenabled, you must use the
278 \fBpasswd\fR command to generate the SMB password for the local user before he
279 can connect to the CIFS service.
281 The \fBpasswd\fR command manages both the Solaris password and SMB password for
282 this user if the \fBpam_smb_passwd\fR module has been added to the system's PAM
283 configuration.
287 .ne 2
289 \fB\fBget\fR [[\fB-p\fR \fIproperty\fR=\fIvalue\fR] \&.\|.\|.] \fIgroup\fR\fR
291 .sp .6
292 .RS 4n
293 Retrieves property values for the specified group. If no property is specified,
294 all property values are shown.
298 .ne 2
300 \fB\fBjoin\fR \fB[-y] -u\fR \fIusername\fR \fIdomain\fR\fR
302 .sp .6
303 .RS 4n
304 Joins a Windows domain or a workgroup.
306 The default mode for the \fBCIFS\fR service is workgroup mode, which uses the
307 default workgroup name, \fBWORKGROUP\fR.
309 An authenticated user account is required to join a domain, so you must specify
310 the Windows administrative user name with the \fB-u\fR option. If the password
311 is not specified on the command line, the user is prompted for it. This user
312 should be the domain administrator or any user who has administrative
313 privileges for the target domain.
315 \fIusername\fR and \fIdomain\fR can be entered in any of the following formats:
317 .in +2
319 \fIusername\fR[+\fIpassword\fR] \fIdomain\fR
320 \fIdomain\fR\e\fIusername\fR[+\fIpassword\fR]
321 \fIdomain\fR/\fIusername\fR[+\fIpassword\fR]
322 \fIusername\fR@\fIdomain\fR
324 .in -2
327 \&...where \fIdomain\fR can be the NetBIOS or DNS domain name.
329 If a machine trust account for the system already exists on a domain
330 controller, any authenticated user account can be used when joining the domain.
331 However, if the machine trust account does \fBnot\fR already exist, an account
332 that has administrative privileges on the domain is required to join the
333 domain.
334 Specifying \fB-y\fR will bypass the smb service restart prompt.
338 .ne 2
340 \fB\fBjoin\fR \fB[-y] -w\fR \fIworkgroup\fR\fR
342 .sp .6
343 .RS 4n
344 Joins a Windows domain or a workgroup.
346 The \fB-w\fR \fIworkgroup\fR option specifies the name of the workgroup to join
347 when using the \fBjoin\fR subcommand.
348 Specifying \fB-y\fR will bypass the smb service restart prompt.
352 .ne 2
354 \fB\fBlist\fR\fR
356 .sp .6
357 .RS 4n
358 Shows information about the current workgroup or domain. The information
359 typically includes the workgroup name or the primary domain name. When in
360 domain mode, the information includes domain controller names and trusted
361 domain names.
363 Each entry in the output is identified by one of the following tags:
365 .ne 2
367 \fB\fB- [*] -\fR\fR
369 .RS 11n
370 Primary domain
374 .ne 2
376 \fB\fB- [.] -\fR\fR
378 .RS 11n
379 Local domain
383 .ne 2
385 \fB\fB- [-] -\fR\fR
387 .RS 11n
388 Other domains
392 .ne 2
394 \fB\fB- [+] -\fR\fR
396 .RS 11n
397 Selected domain controller
403 .ne 2
405 \fB\fBlookup\fR\fR \fIaccount-name\fR [\fIaccount-name\fR [\&.\|.\|.]]
408 .sp .6
409 .RS 4n
410 Lookup the SID for the given \fIaccount-name\fR, or lookup the
411 \fIaccount-name\fR for the given SID.  This subcommand is
412 primarily for diagnostic use, to confirm whether the server
413 can lookup domain accounts and/or SIDs.
417 .ne 2
419 \fB\fBremove-member\fR -m \fImember\fR [[-m \fImember\fR] \&.\|.\|.]
420 \fIgroup\fR\fR
422 .sp .6
423 .RS 4n
424 Removes the specified member from the specified \fBCIFS\fR local group. The
425 \fB-m\fR \fImember\fR option specifies the name of a \fBCIFS\fR local group
426 member. The member name must include an existing user name and an optional
427 domain name.
429 Specify the member name in either of the following formats:
431 .in +2
433 [\fIdomain\fR\e]\fIusername\fR
434 [\fIdomain\fR/]\fIusername\fR
436 .in -2
439 For example, a valid member name might be \fBsales\eterry\fR or
440 \fBsales/terry\fR, where \fBsales\fR is the Windows domain name and \fBterry\fR
441 is the name of a user in the \fBsales\fR domain.
445 .ne 2
447 \fB\fBrename\fR \fIgroup\fR \fInew-group\fR\fR
449 .sp .6
450 .RS 4n
451 Renames the specified \fBCIFS\fR local group. The group must already exist. The
452 built-in groups cannot be renamed.
456 .ne 2
458 \fB\fBset\fR \fB-p\fR \fIproperty\fR=\fIvalue\fR [[\fB-p\fR
459 \fIproperty\fR=\fIvalue\fR] \&.\|.\|.] \fIgroup\fR\fR
461 .sp .6
462 .RS 4n
463 Sets configuration properties for a \fBCIFS\fR local group. The description and
464 the privileges for the built-in groups cannot be changed.
466 The \fB-p\fR \fIproperty\fR\fB=\fR\fIvalue\fR option specifies the list of
467 properties to be set on the specified group.
469 The group-related properties are as follows:
471 .ne 2
473 \fB\fBbackup=[on|off]\fR\fR
475 .sp .6
476 .RS 4n
477 Specifies whether members of the \fBCIFS\fR local group can bypass file access
478 controls to back up file system objects.
482 .ne 2
484 \fB\fBdescription=\fR\fIdescription-text\fR\fR
486 .sp .6
487 .RS 4n
488 Specifies a text description for the \fBCIFS\fR local group.
492 .ne 2
494 \fB\fBrestore=[on|off]\fR\fR
496 .sp .6
497 .RS 4n
498 Specifies whether members of the \fBCIFS\fR local group can bypass file access
499 controls to restore file system objects.
503 .ne 2
505 \fB\fBtake-ownership=[on|off]\fR\fR
507 .sp .6
508 .RS 4n
509 Specifies whether members of the \fBCIFS\fR local group can take ownership of
510 file system objects.
516 .ne 2
518 \fB\fBshow\fR [\fB-m\fR] [\fB-p\fR] [\fIgroup\fR]\fR
520 .sp .6
521 .RS 4n
522 Shows information about the specified \fBCIFS\fR local group or groups. If no
523 group is specified, information is shown for all groups. If the \fB-m\fR option
524 is specified, the group members are also shown. If the \fB-p\fR option is
525 specified, the group privileges are also shown.
528 .SH EXIT STATUS
530 The following exit values are returned:
532 .ne 2
534 \fB0\fR
536 .RS 13n
537 Successful completion.
541 .ne 2
543 \fB>0\fR
545 .RS 13n
546 An error occurred.
549 .SH ATTRIBUTES
551 See the \fBattributes\fR(5) man page for descriptions of the following
552 attributes:
557 box;
558 c | c
559 l | l .
560 ATTRIBUTE TYPE  ATTRIBUTE VALUE
562 Utility Name and Options        Uncommitted
564 Utility Output Format   Not-An-Interface
566 \fBsmbadm join\fR       Obsolete
569 .SH SEE ALSO
571 \fBpasswd\fR(1), \fBgroupadd\fR(8), \fBidmap\fR(8), \fBidmapd\fR(8),
572 \fBkclient\fR(8), \fBshare\fR(8), \fBsharectl\fR(8), \fBsharemgr\fR(8),
573 \fBsmbd\fR(8), \fBsmbstat\fR(8), \fBsmb\fR(4), \fBsmbautohome\fR(4),
574 \fBattributes\fR(5), \fBpam_smb_passwd\fR(5), \fBsmf\fR(5)