missed some of Derrel's changes
[Samba/gebeck_regimport.git] / examples / LDAP / samba.schema
blob8ff06f2a2a0f1a9657761e0470998fd6b5c46d26
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
14 ########################################################################
15 ##                            HISTORICAL                              ##
16 ########################################################################
19 ## Password hashes
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 )
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 )
32 ## Account flags in string format ([UWDX     ])
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 )
40 ## Password timestamps & policies
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 )
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 )
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 )
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 )
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 )
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 )
73 ## string settings
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 )
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 )
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 )
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 )
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} )
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} )
106 ## user and group RID
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 )
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 )
119 ## The smbPasswordEntry objectclass has been depreciated in favor of the
120 ## sambaAccount objectclass
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 ))
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 ))
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 ))
143 ########################################################################
144 ##                        END OF HISTORICAL                           ##
145 ########################################################################
147 #######################################################################
148 ##                Attributes used by Samba 3.0 schema                ##
149 #######################################################################
152 ## Password hashes
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 )
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 )
165 ## Account flags in string format ([UWDX     ])
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 )
173 ## Password timestamps & policies
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 )
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 )
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 )
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 )
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 )
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 )
205 attributetype ( 1.3.6.1.4.1.7165.2.1.48 NAME 'sambaBadPasswordCount'
206         DESC 'Bad password attempt count'
207         EQUALITY integerMatch
208         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
210 attributetype ( 1.3.6.1.4.1.7165.2.1.49 NAME 'sambaBadPasswordTime'
211         DESC 'Time of the last bad password attempt'
212         EQUALITY integerMatch
213         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
217 ## string settings
219 attributetype ( 1.3.6.1.4.1.7165.2.1.33 NAME 'sambaHomeDrive'
220         DESC 'Driver letter of home directory mapping'
221         EQUALITY caseIgnoreIA5Match
222         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE )
224 attributetype ( 1.3.6.1.4.1.7165.2.1.34 NAME 'sambaLogonScript'
225         DESC 'Logon script path'
226         EQUALITY caseIgnoreMatch
227         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
229 attributetype ( 1.3.6.1.4.1.7165.2.1.35 NAME 'sambaProfilePath'
230         DESC 'Roaming profile path'
231         EQUALITY caseIgnoreMatch
232         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
234 attributetype ( 1.3.6.1.4.1.7165.2.1.36 NAME 'sambaUserWorkstations'
235         DESC 'List of user workstations the user is allowed to logon to'
236         EQUALITY caseIgnoreMatch
237         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{255} SINGLE-VALUE )
239 attributetype ( 1.3.6.1.4.1.7165.2.1.37 NAME 'sambaHomePath'
240         DESC 'Home directory UNC path'
241         EQUALITY caseIgnoreMatch
242         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
244 attributetype ( 1.3.6.1.4.1.7165.2.1.38 NAME 'sambaDomainName'
245         DESC 'Windows NT domain to which the user belongs'
246         EQUALITY caseIgnoreMatch
247         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )
249 attributetype ( 1.3.6.1.4.1.7165.2.1.47 NAME 'sambaMungedDial'
250         DESC ''
251         EQUALITY caseExactMatch
252         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1050} )
255 ## SID, of any type
258 attributetype ( 1.3.6.1.4.1.7165.2.1.20 NAME 'sambaSID'
259         DESC 'Security ID'
260         EQUALITY caseIgnoreIA5Match
261         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
265 ## Primary group SID, compatible with ntSid
268 attributetype ( 1.3.6.1.4.1.7165.2.1.23 NAME 'sambaPrimaryGroupSID'
269         DESC 'Primary Group Security ID'
270         EQUALITY caseIgnoreIA5Match
271         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
274 ## group mapping attributes
276 attributetype ( 1.3.6.1.4.1.7165.2.1.19 NAME 'sambaGroupType'
277         DESC 'NT Group Type'
278         EQUALITY integerMatch
279         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
282 ## Store info on the domain
285 attributetype ( 1.3.6.1.4.1.7165.2.1.21 NAME 'sambaNextUserRid'
286         DESC 'Next NT rid to give our for users'
287         EQUALITY integerMatch
288         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
290 attributetype ( 1.3.6.1.4.1.7165.2.1.22 NAME 'sambaNextGroupRid'
291         DESC 'Next NT rid to give out for groups'
292         EQUALITY integerMatch
293         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
295 attributetype ( 1.3.6.1.4.1.7165.2.1.39 NAME 'sambaNextRid'
296         DESC 'Next NT rid to give out for anything'
297         EQUALITY integerMatch
298         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
300 attributetype ( 1.3.6.1.4.1.7165.2.1.40 NAME 'sambaAlgorithmicRidBase'
301         DESC 'Base at which the samba RID generation algorithm should operate'
302         EQUALITY integerMatch
303         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
306 #######################################################################
307 ##              objectClasses used by Samba 3.0 schema               ##
308 #######################################################################
310 ## The X.500 data model (and therefore LDAPv3) says that each entry can
311 ## only have one structural objectclass.  OpenLDAP 2.0 does not enforce
312 ## this currently but will in v2.1
315 ## added new objectclass (and OID) for 3.0 to help us deal with backwards
316 ## compatibility with 2.2 installations (e.g. ldapsam_compat)  --jerry
318 objectclass ( 1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
319         DESC 'Samba 3.0 Auxilary SAM Account'
320         MUST ( uid $ sambaSID )
321         MAY  ( cn $ sambaLMPassword $ sambaNTPassword $ sambaPwdLastSet $
322                sambaLogonTime $ sambaLogoffTime $ sambaKickoffTime $
323                sambaPwdCanChange $ sambaPwdMustChange $ sambaAcctFlags $
324                displayName $ sambaHomePath $ sambaHomeDrive $ sambaLogonScript $
325                sambaProfilePath $ description $ sambaUserWorkstations $
326                sambaPrimaryGroupSID $ sambaDomainName $ sambaMungedDial $
327                sambaBadPasswordCount $ sambaBadPasswordTime))
330 ## Group mapping info
332 objectclass ( 1.3.6.1.4.1.7165.2.2.4 NAME 'sambaGroupMapping' SUP top AUXILIARY
333         DESC 'Samba Group Mapping'
334         MUST ( gidNumber $ sambaSID $ sambaGroupType )
335         MAY  ( displayName $ description ))
338 ## Whole-of-domain info
340 objectclass ( 1.3.6.1.4.1.7165.2.2.5 NAME 'sambaDomain' SUP top STRUCTURAL
341         DESC 'Samba Domain Information'
342         MUST ( sambaDomainName $ 
343                sambaSID ) 
344         MAY ( sambaNextRid $ sambaNextGroupRid $ sambaNextUserRid $
345               sambaAlgorithmicRidBase ) )
347 ## used for idmap_ldap module
348 objectclass ( 1.3.6.1.4.1.7165.1.2.2.7 NAME 'sambaUnixIdPool' SUP top AUXILIARY
349         DESC 'Pool for allocating UNIX uids/gids'
350         MUST ( uidNumber $ gidNumber ) )
353 objectclass ( 1.3.6.1.4.1.7165.1.2.2.8 NAME 'sambaIdmapEntry' SUP top AUXILIARY
354         DESC 'Mapping from a SID to an ID'
355         MUST ( sambaSID )
356         MAY ( uidNumber $ gidNumber ) )
358 objectclass ( 1.3.6.1.4.1.7165.1.2.2.9 NAME 'sambaSidEntry' SUP top STRUCTURAL
359         DESC 'Structural Class for a SID'
360         MUST ( sambaSID ) )