python dsadmin module: 389 made easy

Rich Megginson, the 389 Keymaster, created this wonderful python library

To create a new root suffix just

credential = {
'host': 'localhost,
'port': 10389,
'cn=directory manager',
'bindpw': 'secret'

Connect to an already-existing instance passing our dict variable as function arguments
conn = DA(**credential)

Create a backend database
backend_name = conn.setupBackend('o=addressbook1')

Bind it to an entry
conn.setupSuffix(suffix='o=addressbook1', bename=backend_name)

And create the entry

e = Entry('o=addressbook1')
e.setValue('objectclass', ['top','organization'])

Easy, isn’t it?

Lascia un commento