summaryrefslogtreecommitdiff
path: root/docs/manpages/smbgroupedit.8
blob: 05dc9f9ed48cfaf9683e8a1af55a436f017cb1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
.\" This manpage has been automatically generated by docbook2man-spec
.\" from a DocBook document.  docbook2man-spec can be found at:
.\" <http://shell.ipoline.com/~elmert/hacks/docbook2X/> 
.\" Please send any bug reports, improvements, comments, patches, 
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "SMBGROUPEDIT" "8" "10 January 2002" "" ""
.SH NAME
smbgroupedit \- Query/set/change UNIX - Windows NT group mapping
.SH SYNOPSIS
.sp
\fBsmbroupedit\fR [ \fB-v [l|s]\fR ]  [ \fB-a UNIX-groupname [-d NT-groupname|-p prividge|\fR ] 
.SH "DESCRIPTION"
.PP
This program is part of the Samba
suite.
.PP
The smbgroupedit command allows for mapping unix groups
to NT Builtin, Domain, or Local groups. Also
allows setting privileges for that group, such as saAddUser,
etc.
.SH "OPTIONS"
.TP
\fB-v[l|s]\fR
This option will list all groups available
in the Windows NT domain in which samba is operating.
.RS
.TP
\fB-l\fR
give a long listing, of the format:

.sp
.nf
"NT Group Name"
    SID            :
    Unix group     :
    Group type     :
    Comment        :
    Privilege      :
.sp
.fi

For examples,

.sp
.nf
Users
    SID : S-1-5-32-545
    Unix group: -1
    Group type: Local group
    Comment :
    Privilege : No privilege
.sp
.fi
.TP
\fB-s\fR
display a short listing of the format:

.sp
.nf
NTGroupName(SID) -> UnixGroupName
.sp
.fi

For example,

.sp
.nf
Users (S-1-5-32-545) -> -1
.sp
.fi
.RE
.SH "FILES"
.PP
.SH "EXIT STATUS"
.PP
\fBsmbgroupedit\fR returns a status of 0 if the
operation completed successfully, and a value of 1 in the event
of a failure.
.SH "EXAMPLES"
.PP
To make a subset of your samba PDC users members of
the 'Domain Admins' Global group:
.IP 1. 
create a unix group (usually in
\fI/etc/group\fR), let's call it domadm.
.IP 2. 
add to this group the users that you want to be
domain administrators. For example if you want joe, john and mary,
your entry in \fI/etc/group\fR will look like:

domadm:x:502:joe,john,mary
.IP 3. 
map this domadm group to the 'domain admins' group:
.RS
.IP 1. 
Get the SID for the Windows NT "Domain Admins"
group:

.sp
.nf
root# \fBsmbgroupedit -vs | grep "Domain Admins"\fR
Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -> -1
.sp
.fi
.IP 2. 
map the unix domadm group to the Windows NT
"Domain Admins" group, by running the command:

.sp
.nf
root# \fBsmbgroupedit \\
-c S-1-5-21-1108995562-3116817432-1375597819-512 \\
-u domadm\fR
.sp
.fi

\fBwarning:\fR don't copy and paste this sample, the
Domain Admins SID (the S-1-5-21-...-512) is different for every PDC.
.RE
.PP
To verify that you mapping has taken effect:
.PP
.PP
.sp
.nf
root# \fBsmbgroupedit -vs|grep "Domain Admins"\fR
Domain Admins (S-1-5-21-1108995562-3116817432-1375597819-512) -> domadm
.sp
.fi
.PP
.PP
To give access to a certain directory on a domain member machine (an
NT/W2K or a samba server running winbind) to some users who are member
of a group on your samba PDC, flag that group as a domain group:
.PP
.PP
.sp
.nf
root# \fBsmbgroupedit -a unixgroup -td\fR
.sp
.fi
.PP
.SH "VERSION"
.PP
This man page is correct for the 3.0alpha releases of
the Samba suite.
.SH "SEE ALSO"
.PP
smb.conf(5)
.SH "AUTHOR"
.PP
The original Samba software and related utilities
were created by Andrew Tridgell. Samba is now developed
by the Samba Team as an Open Source project similar
to the way the Linux kernel is developed.
.PP
\fBsmbgroupedit\fR was written by Jean Francois Micouleau.
The current set of manpages and documentation is maintained
by the Samba Team in the same fashion as the Samba source code.