populating the directory
populating the directory
We can put many objects in a LDAP directory. And we are free how to structure the data. We could put all at the same place or we can create subbranches where we want to lay the data. To create subbranches one usually uses "organisational units" (ou). So we first want to create a ou that shall hold all our users data.
ou_users.ldif:
# users ou dn: ou=users,dc=redflo,dc=de ou: users objectClass: organizationalUnit
and we add it with ldapadd:
ldapadd -x -D "cn=Manager,dc=redflo,dc=de" -W -f ou_users.ldif
Enter LDAP Password:
adding new entry "ou=users,dc=redflo,dc=de"
You could also be very lazy and use a graphical interface to add it. The advantage of a graphical interface is, that you don't have to care about ldif format and schema settings. But you can also learn: We use a graphical interface that can extract the object in a ldif file.
We use luma
- Klick Settings->Manage Server List
- Klick Add...
- choose a name for the connection
- fill the hostname and press "apply". You should see a Base DN.
- On the security tab, uncheck "Anonymous bind"
- On the field "Bind as:" enter your rootdn: cn=Manager,dc=redflo,dc=de
Now we use the Plugin "Usermanagement" to modify the directory:
- At "server" choose your connection
- klick "Add..."
- expand your connection, your base dn and highlight the ou users and klick "next".
- in The field User ID you insert the unix username
- In Common name we insert it again
- Click on "Manage group memberships" and set the unix group (we'll use ldap groups later)
- Set a password. Even if we don't want to use it, it is more secure to choose a good password here so that your ldap directory is safe.
- finish
You can now use the browser to watch the entry. With the browser you can also check what attributes you can set else: Highlight the object and use the contect menu to add a attribute. And you can export the object in ldif format. My ldif file looks like this:
dn: uid=joe,ou=users,dc=redflo,dc=de cn: joe gecos: Joe Cool gidNumber: 500 homeDirectory: /home/joe loginShell: /bin/bash objectClass: top objectClass: posixAccount objectClass: shadowAccount objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: person sn: joe uid: joe uidNumber: 1024 userPassword:: e01ENX1DVVg4bGhIMVg5RGhnL3VMQkU4YS9nPT0K
You could use this as template for inserting new users.
A more powerful but also more complex alternative to luma is Apaches http://directory.apache.org/studio/.
Created by admin. Last Modification: Wednesday 20 of August, 2008 20:50:40 UTC by admin.
Category: UNIX
-
wiki page:
- How to use Microsoft Active Directory with postfix
- inserting the first object in your ldap directory
- Installing the mailsystem packages
- Integrating LDAP in your unix system
- Introduction
- Kerberizing kadmin
- Kerberizing sshd
- Kerberos setup
- LDAP
- LDAP schema files
- logging
- Motivation
- nss_ldap security
- OpenLDAP config files
- Other documentation
- performing a first ldap query
- PerfParse
- populating the directory
- Postfix and cyrus imapd and kerberos and LDAP
- Setting up a kerberos client machine
- Setting up your Kerberos servers
- SIngle sign on (SSO) first try
- SSO and Central Administration with Kerberos and LDAP
- Start the kerberos servers
- The configuration files
- The name service switch
- Tweak pam
- Understanding Kerberos
- Understanding Kerberos pt. 2
- Webserver Stress Test Tools
- What is LDAP?
- What the heck is pam?
- What we need
- What we want
- Audience
- Authenticating
- Bash script with timeout function
- Check Processes
- Check your installation
- Choosing a Realm
- configure your mail client
- Configuring and understanding pam
- configuring cyrus imapd
- configuring postfix
- Connect to kadmind and have a look into the database
- Creating the kerberos database
- Edit the Kerberos Admin Server ACL config
- Edit the kerberos client config file
- Edit the kerberos server config file
- Excursus to principals
- exploring schemas
- Fight Image Spam
- Fight Spam best practice
- adding a group
- Adding principals and authenticating
- Another principal
- nss with Solaris 10
- SerialConsole






