Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to add automount entries to LDAP using Directory Utility on MacOSX 10.7.5. I have followed Apple's Autofs documentation to the best of my ability, which is available here:

http://images.apple.com/business/docs/Autofs.pdf

First things first, I go into directory editor, select the "AutomountMap" view, and add a record, let's call it "auto_test", and hit Save. No problems occur here.

Next, I try to add an object of type "automount" as a child of the auto_test object created above. I do this by selecting the "Automount" view, and hitting the "+" button to add a new record.

Whenever I do this, I get the following error, even if I leave the text default as "untitled 1":

An invalid record type was provided. (4101)

I get this error no matter how I enter the information. I also did try changing the entry schema to RFC 2307bis, but with disastrous results. The database is already entirely configured using the default Apple schema.

I tried making a basic LDIF to load the information manually, like so:

dn: automountMapName=auto_master,cn=automountMap,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto_master

dn: automountKey=/data/media,automountMapName=auto_master,cn=automount,dc=example,dc=com
objectClass: automount
automountInformation: auto_media
automountKey: /data/media

dn: automountMapName=auto_media,cn=automountMap,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto_media

dn: automountKey=hostmnt1,automountMapName=auto_media,cn=automount,dc=example,dc=com
objectClass: automount
automountInformation: -resvport,soft,intr,async,rsize=32768,wsize=32768 server:/mnt/hostmnt1
automountKey: hostmnt1

This produces the following result from ldapadd -v -h ldap.example.com -f /tmp/ldap-automount-load.ldif:

ldap_add: No such object (32)
    matched DN: dc=example,dc=com

Apple has provided nearly zero documentation on how to do this.

Has anyone successfully gotten such a thing to properly function, and, if so, how?

share|improve this question

dn: automountMapName=auto_media,cn=automountMap,dc=example,dc=com
objectClass: top
objectClass: automountMap
automountMapName: auto_media

dn: automountKey=hostmnt1,automountMapName=auto_media,cn=automount,dc=example,dc=com
objectClass: automount
automountInformation: -resvport,soft,intr,async,rsize=32768,wsize=32768 server:/mnt/hostmnt1
automountKey: hostmnt1

The last entry can't be added because its cn says "automount". There is no proper parent entry. Its cn has to be "automountMap"

share|improve this answer

Not having played with the Apple directory service that much, I would wager that the fully qualified LDAP DN for you setup is not dc=example,dc=com.

Is that a 'cleaned up for posting' version of the real DN's? If not, then obviously the values must differ for you servers specific case.

If you do an `ldapsearch -h ldap.example.com -x' you should see the namingContexts which should give you a hint of what the real base DN is.

share|improve this answer
    
That is, in fact, a 'cleaned up for posting' version of the real DNs. :) – Ned W. Aug 1 '13 at 21:25
    
@NedW. So looking at the namingContexts from an ldapsearch -x style event, what do you see in terms of DN's to use, and does your real DN look appropriate? Do you have a DN of cn=automountMap for real, as a child of your root domain? I.e. Your LDAP add adds objects into a cn=automountMap container, but does that actually exist if your browse it via LDAP? – geoffc Aug 1 '13 at 23:22
    
Here is what I get. host:~ ned$ ldapsearch -x -h ldap.example.com # extended LDIF # # LDAPv3 # base <> (default) with scope subtree # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object # numResponses: 1 – Ned W. Aug 6 '13 at 21:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .