fix comments about schema dependencies
[ira/wip.git] / examples / LDAP / samba.schema
1 ##
2 ## schema file for OpenLDAP 2.x
3 ## Schema for storing Samba user accounts and group maps in LDAP
4 ## OIDs are owned by the Samba Team
5 ##
6 ## Prerequisite schemas - uid         (cosine.schema)
7 ##                      - displayName (inetorgperson.schema)
8 ##                      - gidNumber   (nis.schema)
9 ##
10 ## 1.3.6.1.4.1.7165.2.1.x - attributetypes
11 ## 1.3.6.1.4.1.7165.2.2.x - objectclasses
12 ##
13
14 ########################################################################
15 ##                            HISTORICAL                              ##
16 ########################################################################
17
18 ##
19 ## Password hashes
20 ##
21 #attributetype ( 1.3.6.1.4.1.7165.2.1.1 NAME 'lmPassword'
22 #       DESC 'LanManager Passwd'
23 #       EQUALITY caseIgnoreIA5Match
24 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
25
26 #attributetype ( 1.3.6.1.4.1.7165.2.1.2 NAME 'ntPassword'
27 #       DESC 'NT Passwd'
28 #       EQUALITY caseIgnoreIA5Match
29 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
30
31 ##
32 ## Account flags in string format ([UWDX     ])
33 ##
34 #attributetype ( 1.3.6.1.4.1.7165.2.1.4 NAME 'acctFlags'
35 #       DESC 'Account Flags'
36 #       EQUALITY caseIgnoreIA5Match
37 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE )
38
39 ##
40 ## Password timestamps & policies
41 ##
42 #attributetype ( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet'
43 #       DESC 'NT pwdLastSet'
44 #       EQUALITY integerMatch
45 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
46
47 #attributetype ( 1.3.6.1.4.1.7165.2.1.5 NAME 'logonTime'
48 #       DESC 'NT logonTime'
49 #       EQUALITY integerMatch
50 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
51
52 #attributetype ( 1.3.6.1.4.1.7165.2.1.6 NAME 'logoffTime'
53 #       DESC 'NT logoffTime'
54 #       EQUALITY integerMatch
55 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
56
57 #attributetype ( 1.3.6.1.4.1.7165.2.1.7 NAME 'kickoffTime'
58 #       DESC 'NT kickoffTime'
59 #       EQUALITY integerMatch
60 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
61
62 #attributetype ( 1.3.6.1.4.1.7165.2.1.8 NAME 'pwdCanChange'
63 #       DESC 'NT pwdCanChange'
64 #       EQUALITY integerMatch
65 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
66
67 #attributetype ( 1.3.6.1.4.1.7165.2.1.9 NAME 'pwdMustChange'
68 #       DESC 'NT pwdMustChange'
69 #       EQUALITY integerMatch
70 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
71
72 ##
73 ## string settings
74 ##
75 #attributetype ( 1.3.6.1.4.1.7165.2.1.10 NAME 'homeDrive'
76 #       DESC 'NT homeDrive'
77 #       EQUALITY caseIgnoreIA5Match
78 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE )
79
80 #attributetype ( 1.3.6.1.4.1.7165.2.1.11 NAME 'scriptPath'
81 #       DESC 'NT scriptPath'
82 #       EQUALITY caseIgnoreIA5Match
83 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE )
84
85 #attributetype ( 1.3.6.1.4.1.7165.2.1.12 NAME 'profilePath'
86 #       DESC 'NT profilePath'
87 #       EQUALITY caseIgnoreIA5Match
88 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE )
89
90 #attributetype ( 1.3.6.1.4.1.7165.2.1.13 NAME 'userWorkstations'
91 #       DESC 'userWorkstations'
92 #       EQUALITY caseIgnoreIA5Match
93 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE )
94
95 #attributetype ( 1.3.6.1.4.1.7165.2.1.17 NAME 'smbHome'
96 #       DESC 'smbHome'
97 #       EQUALITY caseIgnoreIA5Match
98 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} )
99
100 #attributetype ( 1.3.6.1.4.1.7165.2.1.18 NAME 'domain'
101 #       DESC 'Windows NT domain to which the user belongs'
102 #       EQUALITY caseIgnoreIA5Match
103 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} )
104
105 ##
106 ## user and group RID
107 ##
108 #attributetype ( 1.3.6.1.4.1.7165.2.1.14 NAME 'rid'
109 #       DESC 'NT rid'
110 #       EQUALITY integerMatch
111 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
112
113 #attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID'
114 #       DESC 'NT Group RID'
115 #       EQUALITY integerMatch
116 #       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
117
118 ##
119 ## The smbPasswordEntry objectclass has been depreciated in favor of the
120 ## sambaAccount objectclass
121 ##
122 #objectclass ( 1.3.6.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY
123 #        DESC 'Samba smbpasswd entry'
124 #        MUST ( uid $ uidNumber )
125 #        MAY  ( lmPassword $ ntPassword $ pwdLastSet $ acctFlags ))
126
127 #objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
128 #       DESC 'Samba Account'
129 #       MUST ( uid $ rid )
130 #       MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
131 #               logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $
132 #               displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
133 #               description $ userWorkstations $ primaryGroupID $ domain ))
134
135 #objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
136 #       DESC 'Samba Auxiliary Account'
137 #       MUST ( uid $ rid )
138 #       MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
139 #              logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $
140 #              displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
141 #              description $ userWorkstations $ primaryGroupID $ domain ))
142
143 ########################################################################
144 ##                        END OF HISTORICAL                           ##
145 ########################################################################
146
147 #######################################################################
148 ##                Attributes used by Samba 3.0 schema                ##
149 #######################################################################
150
151 ##
152 ## Password hashes
153 ##
154 attributetype ( 1.3.6.1.4.1.7165.2.1.24 NAME 'sambaLMPassword'
155         DESC 'LanManager Password'
156         EQUALITY caseIgnoreIA5Match
157         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
158
159 attributetype ( 1.3.6.1.4.1.7165.2.1.25 NAME 'sambaNTPassword'
160         DESC 'MD4 hash of the unicode password'
161         EQUALITY caseIgnoreIA5Match
162         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
163
164 ##
165 ## Account flags in string format ([UWDX     ])
166 ##
167 attributetype ( 1.3.6.1.4.1.7165.2.1.26 NAME 'sambaAcctFlags'
168         DESC 'Account Flags'
169         EQUALITY caseIgnoreIA5Match
170         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE )
171
172 ##
173 ## Password timestamps & policies
174 ##
175 attributetype ( 1.3.6.1.4.1.7165.2.1.27 NAME 'sambaPwdLastSet'
176         DESC 'Timestamp of the last password update'
177         EQUALITY integerMatch
178         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
179
180 attributetype ( 1.3.6.1.4.1.7165.2.1.28 NAME 'sambaPwdCanChange'
181         DESC 'Timestamp of when the user is allowed to update the password'
182         EQUALITY integerMatch
183         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
184
185 attributetype ( 1.3.6.1.4.1.7165.2.1.29 NAME 'sambaPwdMustChange'
186         DESC 'Timestamp of when the password will expire'
187         EQUALITY integerMatch
188         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
189
190 attributetype ( 1.3.6.1.4.1.7165.2.1.30 NAME 'sambaLogonTime'
191         DESC 'Timestamp of last logon'
192         EQUALITY integerMatch
193         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
194
195 attributetype ( 1.3.6.1.4.1.7165.2.1.31 NAME 'sambaLogoffTime'
196         DESC 'Timestamp of last logoff'
197         EQUALITY integerMatch
198         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
199
200 attributetype ( 1.3.6.1.4.1.7165.2.1.32 NAME 'sambaKickoffTime'
201         DESC 'Timestamp of when the user will be logged off automatically'
202         EQUALITY integerMatch
203         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
204
205
206 ##
207 ## string settings
208 ##
209 attributetype ( 1.3.6.1.4.1.7165.2.1.33 NAME 'sambaHomeDrive'
210         DESC 'Driver letter of home directory mapping'
211         EQUALITY caseIgnoreIA5Match
212         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE )
213
214 attributetype ( 1.3.6.1.4.1.7165.2.1.34 NAME 'sambaLogonScript'
215         DESC 'Logon script path'
216         EQUALITY caseIgnoreMatch
217         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
218
219 attributetype ( 1.3.6.1.4.1.7165.2.1.35 NAME 'sambaProfilePath'
220         DESC 'Roaming profile path'
221         EQUALITY caseIgnoreMatch
222         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
223
224 attributetype ( 1.3.6.1.4.1.7165.2.1.36 NAME 'sambaUserWorkstations'
225         DESC 'List of user workstations the user is allowed to logon to'
226         EQUALITY caseIgnoreMatch
227         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
228
229 attributetype ( 1.3.6.1.4.1.7165.2.1.37 NAME 'sambaHomePath'
230         DESC 'Home directory UNC path'
231         EQUALITY caseIgnoreMatch
232         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
233
234 attributetype ( 1.3.6.1.4.1.7165.2.1.38 NAME 'sambaDomainName'
235         DESC 'Windows NT domain to which the user belongs'
236         EQUALITY caseIgnoreMatch
237         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
238
239 ##
240 ## SID, of any type
241 ##
242
243 attributetype ( 1.3.6.1.4.1.7165.2.1.20 NAME 'sambaSID'
244         DESC 'Security ID'
245         EQUALITY caseIgnoreIA5Match
246         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
247
248
249 ##
250 ## Primary group SID, compatible with ntSid
251 ##
252
253 attributetype ( 1.3.6.1.4.1.7165.2.1.23 NAME 'sambaPrimaryGroupSID'
254         DESC 'Primary Group Security ID'
255         EQUALITY caseIgnoreIA5Match
256         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
257
258 ##
259 ## group mapping attributes
260 ##
261 attributetype ( 1.3.6.1.4.1.7165.2.1.19 NAME 'sambaGroupType'
262         DESC 'NT Group Type'
263         EQUALITY integerMatch
264         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
265
266 ##
267 ## Store info on the domain
268 ##
269
270 attributetype ( 1.3.6.1.4.1.7165.2.1.21 NAME 'sambaNextUserRid'
271         DESC 'Next NT rid to give our for users'
272         EQUALITY integerMatch
273         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
274
275 attributetype ( 1.3.6.1.4.1.7165.2.1.22 NAME 'sambaNextGroupRid'
276         DESC 'Next NT rid to give out for groups'
277         EQUALITY integerMatch
278         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
279
280 attributetype ( 1.3.6.1.4.1.7165.2.1.39 NAME 'sambaNextRid'
281         DESC 'Next NT rid to give out for anything'
282         EQUALITY integerMatch
283         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
284
285 attributetype ( 1.3.6.1.4.1.7165.2.1.40 NAME 'sambaAlgorithmicRidBase'
286         DESC 'Base at which the samba RID generation algorithm should operate'
287         EQUALITY integerMatch
288         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
289
290
291 #######################################################################
292 ##              objectClasses used by Samba 3.0 schema               ##
293 #######################################################################
294
295 ## The X.500 data model (and therefore LDAPv3) says that each entry can
296 ## only have one structural objectclass.  OpenLDAP 2.0 does not enforce
297 ## this currently but will in v2.1
298
299 ##
300 ## added new objectclass (and OID) for 3.0 to help us deal with backwards
301 ## compatibility with 2.2 installations (e.g. ldapsam_compat)  --jerry
302 ##
303 objectclass ( 1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
304         DESC 'Samba 3.0 Auxilary SAM Account'
305         MUST ( uid $ sambaSID )
306         MAY  ( cn $ sambaLMPassword $ sambaNTPassword $ sambaPwdLastSet $
307                sambaLogonTime $ sambaLogoffTime $ sambaKickoffTime $
308                sambaPwdCanChange $ sambaPwdMustChange $ sambaAcctFlags $
309                displayName $ sambaHomePath $ sambaHomeDrive $ sambaLogonScript $
310                sambaProfilePath $ description $ sambaUserWorkstations $
311                sambaPrimaryGroupSID $ sambaDomainName ))
312
313 ##
314 ## Group mapping info
315 ##
316 objectclass ( 1.3.6.1.4.1.7165.2.2.4 NAME 'sambaGroupMapping' SUP top AUXILIARY
317         DESC 'Samba Group Mapping'
318         MUST ( gidNumber $ sambaSID $ sambaGroupType )
319         MAY  ( displayName $ description ))
320
321 ##
322 ## Whole-of-domain info
323 ##
324 objectclass ( 1.3.6.1.4.1.7165.2.2.5 NAME 'sambaDomain' SUP top STRUCTURAL
325         DESC 'Samba Domain Information'
326         MUST ( sambaDomainName $ 
327                sambaSID ) 
328         MAY ( sambaNextRid $ sambaNextGroupRid $ sambaNextUserRid $
329               sambaAlgorithmicRidBase ) )
330
331 ## used for idmap_ldap module
332 objectclass ( 1.3.6.1.4.1.7165.1.2.2.7 NAME 'sambaUnixIdPool' SUP top AUXILIARY
333         DESC 'Pool for allocating UNIX uids/gids'
334         MUST ( uidNumber $ gidNumber ) )
335
336
337 objectclass ( 1.3.6.1.4.1.7165.1.2.2.8 NAME 'sambaIdmapEntry' SUP top AUXILIARY
338         DESC 'Mapping from a SID to an ID'
339         MUST ( sambaSID )
340         MAY ( uidNumber $ gidNumber ) )
341
342 objectclass ( 1.3.6.1.4.1.7165.1.2.2.9 NAME 'sambaSidEntry' SUP top STRUCTURAL
343         DESC 'Structural Class for a SID'
344         MUST ( sambaSID ) )
345