--- a/management/univention-directory-manager-modules/modules/univention/admin/handlers/container/dc.py +++ a/management/univention-directory-manager-modules/modules/univention/admin/handlers/container/dc.py @@ -204,149 +204,6 @@ def _ldap_addlist(self): ('objectClass', ['top', 'domain', 'sambaDomain', 'univentionDomain', 'univentionBase']) ] - def _ldap_post_create(self): - dnsname = self.position.getPrintable() - self.lo.add('cn=users,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['users'])]) - self.lo.add('cn=groups,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['groups'])]) - self.lo.add('cn=computers,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['computers'])]) - self.lo.add('cn=univention,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['univention'])]) - self.lo.add('cn=dns,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['dns'])]) - self.lo.add('cn=dhcp,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['dhcp'])]) - self.lo.add('cn=policies,' + self.dn, [('objectClass', ['top', 'organizationalRole']), ('cn', ['policies'])]) - - tmpPosition = univention.admin.uldap.position(self.position.getBase()) - tmpPosition.setDn(self.dn) - - directoryObject = univention.admin.objects.default('settings/directory', self.co, self.lo, tmpPosition) - directoryObject['policy'] = 'cn=policies,%s' % self.dn - directoryObject['dns'] = 'cn=dns,%s' % self.dn - directoryObject['dhcp'] = 'cn=dhcp,%s' % self.dn - directoryObject['users'] = 'cn=users,%s' % self.dn - directoryObject['groups'] = 'cn=groups,%s' % self.dn - directoryObject['computers'] = 'cn=computers,%s' % self.dn - directoryObject.create() - - rootSambaSID = None - while rootSambaSID is None: - rootSambaSID = univention.admin.allocators.requestUserSid(self.lo, tmpPosition, '0') - # FIXME - self.lo.add('uid=root,cn=users,' + self.dn, [ - ('objectClass', ['top', 'posixAccount', 'sambaSamAccount', 'shadowAccount', 'person', 'organizationalPerson', 'univentionPerson', 'inetOrgPerson']), - ('cn', ['root']), - ('uid', ['root']), - ('uidNumber', ['0']), - ('gidNumber', ['0']), - ('homeDirectory', ['/root']), - ('userPassword', [cryptPassword]), - ('loginShell', ['/bin/sh']), - ('sambaLMPassword', lmPassword), - ('sambaNTPassword', ntPassword), - ('sambaSID', [rootSambaSID]), - ('sambaAcctFlags', '[U ]'), - ('sn', ['root']) - ]) - - self.lo.add('cn=default,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'univentionDefault']), - ('univentionDefaultGroup', ['cn=Domain Users,cn=groups,' + tmpPosition.getDn()]), - ('cn', ['default']) - ]) - - self.lo.add('cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['temporary']) - ]) - - self.lo.add('cn=sid,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['sid']) - ]) - - self.lo.add('cn=uidNumber,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole', 'univentionLastUsed']), - ('univentionLastUsedValue', ['1000']), - ('cn', ['uidNumber']) - ]) - - self.lo.add('cn=gidNumber,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole', 'univentionLastUsed']), - ('univentionLastUsedValue', ['1000']), - ('cn', ['gidNumber']) - ]) - - self.lo.add('cn=uid,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['uid']) - ]) - - self.lo.add('cn=gid,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['gid']) - ]) - - self.lo.add('cn=mail,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['mail']) - ]) - - self.lo.add('cn=aRecord,cn=temporary,cn=univention,' + self.dn, [ - ('objectClass', ['top', 'organizationalRole']), - ('cn', ['aRecord']) - ]) - - if self['dnsForwardZone']: - for i in self['dnsForwardZone']: - soa = 'nameserver root.%s.%s 1 28800 7200 604800 10800' % (self['name'], dnsname) - self.lo.add('zoneName=' + i + ',cn=dns,' + self.dn, [ - ('objectClass', ['top', 'dNSZone']), - ('zoneName', [i]), - ('dNSTTL', ['10800']), - ('SOARecord', [soa]), - ('NSRecord', ['nameserver']), - ('relativeDomainName', ['@']) - ]) - - if self['dnsReverseZone']: - for i in self['dnsReverseZone']: - - ipList = i.split('.') - ipList.reverse() - c = '.' - ipString = c.join(ipList) - zoneName = ipString + '.in-addr.arpa' - soa = 'nameserver root.%s.%s 1 28800 7200 604800 10800' % (self['name'], dnsname) - self.lo.add('zoneName=' + zoneName + ',cn=dns,' + self.dn, [ - ('objectClass', ['top', 'dNSZone']), - ('zoneName', [zoneName]), - ('dNSTTL', ['10800']), - ('SOARecord', [soa]), - ('NSRecord', ['nameserver']), - ('relativeDomainName', ['@']) - ]) - oldPos = tmpPosition.getDn() - tmpPosition.setDn('cn=groups,' + tmpPosition.getDn()) - groupObject = univention.admin.objects.default('groups/group', self.co, self.lo, tmpPosition) - groupObject['name'] = 'Domain Users' - groupObject.create() - - groupObject = univention.admin.objects.default('groups/group', self.co, self.lo, tmpPosition) - groupObject['name'] = 'Domain Guests' - groupObject.create() - - groupObject = univention.admin.objects.default('groups/group', self.co, self.lo, tmpPosition) - groupObject['name'] = 'Domain Admins' - groupObject.create() - - groupObject = univention.admin.objects.default('groups/group', self.co, self.lo, tmpPosition) - groupObject['name'] = 'Account Operators' - groupObject.create() - - groupObject = univention.admin.objects.default('groups/group', self.co, self.lo, tmpPosition) - groupObject['name'] = 'Windows Hosts' - groupObject.create() - - tmpPosition.setDn(oldPos) - def lookup(co, lo, filter_s, base='', superordinate=None, scope='sub', unique=False, required=False, timeout=-1, sizelimit=0):