Use the code above to test the LDAP database, but substitute your LDAP server information. So, for our test ldap server at muppet.cs.dixie.edu, our entry would be " 'ldapsearch -x -h muppet.cs.dixie.edu -b 'dc=muppet,dc=cs,dc=dixie,dc=edu' "
This should return a number of records, looking roughly like this:
We now need to add a type into the LDAP directory for a group organizational unit
download this file for the GroupOU.ldif and rename it to GroupOU.ldif (it is a .txt file now). Also, you will need to edit the file and change the dn= entry to match your server domain.
run this command to add the Group info into ldap, substituting for YOUR server information:
# Group, muppet, cs, dixie, edu
dn: ou=Group,dc=muppet,dc=cs,dc=dixie,dc=edu
ou: Group
objectClass: top
objectClass: organizationalUnit
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
Now our LDAP database should be setup and ready to add a test user. This is NOT the final setup, as we will have to change LDAP to work with samba later on, and that will change our LDAP entries for our users. So, do NOT enter any real accounts, just a test account, to make sure it is all working.
Downlaod this ldif (ldap information file) file: posix.ldif, and rename it to posix.ldif (instead of posix.txt) and edit the file to have your server's domain information.
This file is the information for ONE user account. This is a test user, named Buckaroo Bonzai. You would have to make a separate file for EVERY user you want to add into the database.
Now that we have added a user account, we also need to add a group account for that same user (all *nix users also have a group of their own)
Downlaod this ldif (ldap information file) file: group.ldif, and rename it to group.ldif (instead of group.txt) and edit the file to have your server's domain info.
This file is the information for ONE group account, for our test user, Buckaroo Bonzai. You would have to make a separate group file for EVERY user you want to add into the database, so that they also have a group.
Add the file into the database (using your domain):
#
# filter: (objectClass=posixGroup)
# requesting: ALL
#
# bbonzai, Group, muppet, cs, dixie, edu
dn: cn=bbonzai,ou=Group,dc=muppet,dc=cs,dc=dixie,dc=edu
objectClass: top
objectClass: posixGroup
cn: bbonzai
gidNumber: 11000
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
If all of these steps seem to be working correctly, then you should have your ldap server up and running correctly. Now, the best way to test it is to set up another linux machine as a client for this ldap server. Go to the Linux: Client: LDAP Setup section for instructions to see how to do this.
Remember, we are NOT done with the LDAP setup. Do NOT add real users to the system yet. We will make changes to LDAP after we setup samba, and that will change the information for the LDAP accounts. Also, keep in mind that when you test this out on a normal Linux client, the user (bbonzai) does NOT have a home directory yet, so that part will not work. But you should be able to login as that user, or at the very least finger bbonzai to get his info
The next step is to set up the NFS server for the home directories. Proceed to the Linux Server: NFS section to continue.