[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Solaris automount and Openldap



Karsten Künne wrote:
Hi,

I saw some messages on this list in the past months from people trying to use Openldap for Solaris automounter tables without success. That made me curious and I tried it myself. With some help from the Solaris sources I have it working now. The major pitfall is a line similar to the following in the Solaris sources:

if (strcmp(attr->attrname, "nismapentry") == 0)

As you might notice the comparison is not case insensitive. After I modified the nis.schema accordingly everything started working. Following are the relevant entries from my nis.schema:

attributetype ( 1.3.6.1.1.1.1.26 NAME 'nisMapName'
        SUP name )

attributetype ( 1.3.6.1.1.1.1.27 NAME 'nismapentry'
        EQUALITY caseExactIA5Match
        SUBSTR caseExactIA5SubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} SINGLE-VALUE )

objectclass ( 1.3.6.1.1.1.2.9 NAME 'nisMap' SUP top STRUCTURAL
        DESC 'A generic abstraction of a NIS map'
        MUST nisMapName
        MAY description )

objectclass ( 1.3.6.1.1.1.2.10 NAME 'nisObject' SUP top STRUCTURAL
        DESC 'An entry in a NIS map'
        MUST ( cn $ nismapentry $ nisMapName )
        MAY description )


(the "nisMapName" HAS to be mixed case and "nismapentry" HAS to be lower case)


This is how an entry should look like if you do ldapsearch:

dn: cn=user,nismapname=auto_home,o=something,c=us
objectClass: top
objectClass: nisObject
nismapentry: server:/export/home/&
nisMapName: auto_home
cn: user


I can't say who is at fault here, I tend to blame Sun for their case sensitivity, but the whole thing looks pretty much braindead and is one of the reasons why deploying LDAP can be difficult at times. Case sensitivity in attribute names should be avoided. There is another case in core.schema and inetorgperson.schema of less importance, core.schema contains "x500UniqueIdentifier" whereas inetorgperson.schema contains "x500uniqueIdentifier".


I hope I saved somebody some time and nerves with this.


Karsten.

Hi Karsten,

thanks for your success story. Anyway, by the time of reading it, i had already given Solaris 9 a try (after no succes with Solaris 8) and it worked immediately without changes! The only thing is that, if the key contains an underscore ("_") or period, automount fails! The entry is shown while browsing the automount point, but i cannot access it. If i remove the underscore from the key name, it works. Did you experience similar behaviour?

On a related note, one can always get the Solaris automounter to work using executable maps, but then browsing does not work.

Heinrich
--

Heinrich Rebehn

University of Bremen

Physics / Electrical and Electronics Engineering
- Department of Telecommunications -

E-mail: mailto:rebehn@ant.uni-bremen.de
Phone : +49/421/218-4664
Fax   :            -3341