• Published on | Aug 26, 2009 | by FozzTexx

I hate LDAP. NetInfo was awesome!

I'm building a new "NeXT lab" at work and this time around it's mixed with Macs, Windoze, and Linux computers. I want to share accounts and home directories on them all. The only choice is with LDAP.

On Monday I started hammering away at getting the LDAP server setup on the Linux server with openldap. I was able to get a test Mac running Leopard to see the LDAP server and the accounts. The next battle was to get home directories to mount under /home. I was able to do that after finding a working ldif example using auto_master and auto_home. After that I was able to get the Public share automatically mounted on /Network/Public. Wonderful!

Tuesday I came in thinking that the next battle would be with Samba. Unfortunately, somewhere in powering off the Mac and rebooting it, I lost all the share mounting! It still sees the accounts, but it absolutely will not see the mounts. In trying to figure it out I have wiped the LDAP database and restarted it, I have wiped the test Mac twice, I have made sure the Mac is running the latest updates, and still nothing.

If I go into dscl this is now what I see:

 
> ls Automount/
Record Name Unknown
Record Name Unknown
 
> ls AutomountMap/
Record Name Unknown
Record Name Unknown
 
> cat Mounts/10.110.1.1:\/share\/public/
dsAttrTypeNative:cn: 10.110.1.1:/share/public
dsAttrTypeNative:objectClass: mount top
AppleMetaNodeLocation: /LDAPv3/10.110.1.1
RecordName: 10.110.1.1:/share/public
RecordType: dsRecTypeStandard:Mounts
 
On the LDAP server, the records look like:
 
dn: automountMapName=auto_master,ou=mounts,dc=example,dc=com
automountMapName: auto_master
objectClass: top
objectClass: automountMap
 
dn: automountKey=/home,automountMapName=auto_master,ou=mounts,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: /home
automountInformation: auto_home
 
dn: automountMapName=auto_home,ou=mounts,dc=example,dc=com
automountMapName: auto_home
objectClass: top
objectClass: automountMap
 
dn: automountKey=*,automountMapName=auto_home,ou=mounts,dc=example,dc=com
objectClass: top
objectClass: automount
automountKey: *
automountInformation: 10.110.1.1:/home/&
 
dn: cn=10.110.1.1:/share/public,ou=mounts,dc=example,dc=com
mountDirectory: /Network/Public
objectClass: mount
objectClass: top
mountType: nfs
cn: 10.110.1.1:/share/public

It looks like for some reason it's either missing entries from the LDAP server, and/or it's ignoring some of the mapping and leaving them out. The Mounts entry is missing the VFSLinkDir which maps to mountDirectory. The Automount stuff is missing the RecordName which maps to automountKey and automountMapName.

What the heck happened? Why does the Mac refuse to see the LDAP server the way it did on Monday?

Join The Discussion

+1  Posted by Sue Osborn • Aug.26.2009 at 17.24 • Reply

Living in the past? Good ol' NVC days.