Merge Samba 3.0 pdb_ldap from 3.0 into HEAD, so as to allow idra to continue
[sfrench/samba-autobuild/.git] / examples / LDAP / samba.schema
1 ##
2 ## schema file for OpenLDAP 2.0.x
3 ## Schema for storing Samba's smbpasswd file in LDAP
4 ## OIDs are owned by the Samba Team
5 ##
6 ## Prerequisite schemas - uid (cosine.schema)
7 ##                      - displayName (inetorgperson.schema)
8 ##
9 ## 1.3.6.1.4.1.7165.2.1.x - attributetypes
10 ## 1.3.6.1.4.1.7165.2.2.x - objectclasses
11 ##
12
13 ##
14 ## Password hashes
15 ##
16 attributetype ( 1.3.6.1.4.1.7165.2.1.1 NAME 'lmPassword'
17         DESC 'LanManager Passwd'
18         EQUALITY caseIgnoreIA5Match
19         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
20
21 attributetype ( 1.3.6.1.4.1.7165.2.1.2 NAME 'ntPassword'
22         DESC 'NT Passwd'
23         EQUALITY caseIgnoreIA5Match
24         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
25
26 ##
27 ## Account flags in string format ([UWDX     ])
28 ##
29 attributetype ( 1.3.6.1.4.1.7165.2.1.4 NAME 'acctFlags'
30         DESC 'Account Flags'
31         EQUALITY caseIgnoreIA5Match
32         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE )
33
34 ## 
35 ## Password timestamps & policies
36 ##
37 attributetype ( 1.3.6.1.4.1.7165.2.1.3 NAME 'pwdLastSet'
38         DESC 'NT pwdLastSet'
39         EQUALITY integerMatch
40         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
41
42 attributetype ( 1.3.6.1.4.1.7165.2.1.5 NAME 'logonTime'
43         DESC 'NT logonTime'
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.6 NAME 'logoffTime'
48         DESC 'NT logoffTime'
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.7 NAME 'kickoffTime'
53         DESC 'NT kickoffTime'
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.8 NAME 'pwdCanChange'
58         DESC 'NT pwdCanChange'
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.9 NAME 'pwdMustChange'
63         DESC 'NT pwdMustChange'
64         EQUALITY integerMatch
65         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
66
67 ##
68 ## string settings
69 ##
70 attributetype ( 1.3.6.1.4.1.7165.2.1.10 NAME 'homeDrive'
71         DESC 'NT homeDrive'
72         EQUALITY caseIgnoreIA5Match
73         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4} SINGLE-VALUE )
74
75 attributetype ( 1.3.6.1.4.1.7165.2.1.11 NAME 'scriptPath'
76         DESC 'NT scriptPath'
77         EQUALITY caseIgnoreIA5Match
78         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} SINGLE-VALUE )
79
80 attributetype ( 1.3.6.1.4.1.7165.2.1.12 NAME 'profilePath'
81         DESC 'NT profilePath'
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.13 NAME 'userWorkstations'
86         DESC 'userWorkstations'
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.17 NAME 'smbHome'
91         DESC 'smbHome'
92         EQUALITY caseIgnoreIA5Match
93         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} )
94
95 attributetype ( 1.3.6.1.4.1.7165.2.1.18 NAME 'domain'
96         DESC 'Windows NT domain to which the user belongs'
97         EQUALITY caseIgnoreIA5Match
98         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{128} )
99
100 ##
101 ## user and group RID
102 ##
103 attributetype ( 1.3.6.1.4.1.7165.2.1.14 NAME 'rid'
104         DESC 'NT rid'
105         EQUALITY integerMatch
106         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
107
108 attributetype ( 1.3.6.1.4.1.7165.2.1.15 NAME 'primaryGroupID'
109         DESC 'NT Group RID'
110         EQUALITY integerMatch
111         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
112
113 ##
114 ## SID, of any type
115 ##
116
117 attributetype ( 1.3.6.1.4.1.7165.2.1.20 NAME 'ntSid'
118         DESC 'Security ID'
119         EQUALITY caseIgnoreIA5Match
120         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
121
122 ##
123 ## group mapping attributes
124 ##
125 attributetype ( 1.3.6.1.4.1.7165.2.1.19 NAME 'ntGroupType'
126         DESC 'NT Group Type'
127         EQUALITY integerMatch
128         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
129
130 ##
131 ## Store info on the domain
132 ##
133
134 attributetype ( 1.3.6.1.4.1.7165.2.1.21 NAME 'nextUserRid'
135         DESC 'Next NT rid to give our for users'
136         EQUALITY integerMatch
137         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
138
139 attributetype ( 1.3.6.1.4.1.7165.2.1.22 NAME 'nextGroupRid'
140         DESC 'Next NT rid to give out for groups'
141         EQUALITY integerMatch
142         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
143
144 ##
145 ## The smbPasswordEntry objectclass has been depreciated in favor of the
146 ## sambaAccount objectclass
147 ##
148 #objectclass ( 1.3.6.1.4.1.7165.2.2.1 NAME 'smbPasswordEntry' SUP top AUXILIARY
149 #        DESC 'Samba smbpasswd entry'
150 #        MUST ( uid $ uidNumber )
151 #        MAY  ( lmPassword $ ntPassword $ pwdLastSet $ acctFlags ))
152
153 #objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top STRUCTURAL
154 #       DESC 'Samba Account'
155 #       MUST ( uid $ rid ) 
156 #       MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
157 #               logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ 
158 #               displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
159 #               description $ userWorkstations $ primaryGroupID $ domain ))
160
161 ## The X.500 data model (and therefore LDAPv3) says that each entry can 
162 ## only have one structural objectclass.  OpenLDAP 2.0 does not enforce 
163 ## this currently but will in v2.1
164
165 objectclass ( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' SUP top AUXILIARY
166         DESC 'Samba Auxilary Account'
167         MUST ( uid $ ntSid ) 
168         MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
169                logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $ acctFlags $ 
170                displayName $ smbHome $ homeDrive $ scriptPath $ profilePath $
171                description $ userWorkstations $ primaryGroupID $ domain ))
172
173 ############################################################################
174 ##
175 ## Please note that this schema is really experimental and might 
176 ## change before the 3.0 release.
177 ##
178 ############################################################################
179
180 ##
181 ## Whole-of-domain info
182 ##
183
184 objectclass ( 1.3.6.1.4.1.7165.2.2.5 NAME 'sambaDomain' SUP top STRUCTURAL
185         DESC 'Samba Domain Information'
186         MUST ( domain $ nextGroupRid $ nextUserRid $ ntSid)) 
187
188 ##
189 ## Group mapping info
190 ##
191 objectclass ( 1.3.6.1.4.1.7165.2.2.4 NAME 'sambaGroupMapping' SUP top AUXILIARY
192         DESC 'Samba Group Mapping'
193         MUST ( gidNumber $ ntSid $ ntGroupType ) 
194         MAY  ( displayName $ description ))
195
196 ##
197 ## Used for Winbind experimentation
198 ##
199 #objectclass ( 1.3.6.1.4.1.7165.1.2.2.3 NAME 'uidPool' SUP top AUXILIARY
200 #       DESC 'Pool for allocating UNIX uids'
201 #       MUST ( uidNumber ) )
202
203 #objectclass ( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' SUP top AUXILIARY
204 #       DESC 'Pool for allocating UNIX gids'
205 #       MUST ( gidNumber ) )
206