Organizational Unit

Usage example

# Don't forget that Services requires created rdn='ou=Services'
# This you can create with OrganizationalUnits

from lib389.idm.organizationalunit import OrganizationalUnits
from import ServiceAccounts

ous = OrganizationalUnits(standalone, DEFAULT_SUFFIX)
services = ServiceAccounts(standalone, DEFAULT_SUFFIX)

# Create the OU for them
        'ou': 'Services',
        'description': 'Computer Service accounts which request DS bind',

# Now, we can create the services from here.
service = services.create(properties={
    'cn': 'testbind',
    'userPassword': 'Password1'

conn = service.bind('Password1')

Module documentation

class lib389.idm.organizationalunit.OrganizationalUnits(instance, basedn)[source]

DSLdapObjects that represents OrganizationalUnits entry

  • instance (lib389.DirSrv) – An instance
  • basedn (str) – Base DN for all group entries below
class lib389.idm.organizationalunit.OrganizationalUnit(instance, dn=None)[source]

A single instance of OrganizationalUnit entry

  • instance (lib389.DirSrv) – An instance
  • dn (str) – Entry DN