linux automount using nis maps from solaris

Discussion in 'Linux Networking' started by anon, Sep 30, 2004.

  1. anon

    anon Guest

    I am trying to get the linux automount (3.1.7) to accept the (NIS) maps that
    our solaris systems use. The autofs script causes things like:
    /usr/sbin/automount /work yp -ro,soft
    to be executed. This looks right to me, but the automount program complains
    "parse(sun): unknown option" and proceds to mount the entries in
    for read/write instead of readonly. Otherwise thinks seem to be okay.

    Why is automount choaking on "-ro,soft"? I have searched the web but cant
    find anywhere where this is addressed... and the man page for automount is
    not to helpful.

    It seems implausable that linux's automount cant handle somehting this
    simple... after all it can handle these same options when they are part of
    an entry in the indirect map ( in my case)... so it would be simple
    to apply the options to all of the entries in the map... trival... It seem
    to me that automount cant be that dumb... so I must be the one who is being
    dumb... What am I doing wrong?

    Here are the to maps:

    /work -ro,soft

    # auto_work
    dev1 hostg:/t5s6/dev1
    dev2 hostg:/t5s7/dev2
    anon, Sep 30, 2004
    1. Advertisements

  2. Perhaps you should put mount options into map, not into auto.master.
    Andrei Ivanov, Sep 30, 2004
    1. Advertisements

  3. anon

    Juhan Leemet Guest

    Hmm, I had a lot of problems trying to get Linux to mount direct maps a
    couple of years ago. I ended up giving up, when I came across some
    documentation that clearly stated that Linux autofs does NOT handle direct
    maps. I can't remember that version (but I think it may have been in SuSE
    7.2?) I ended up translating these mounts to virtual user /home/*
    directories. Yeah, that smells, but it worked for me. I got angry. Sigh.

    Relatively recently (like earlier this year?) someone pointed out that for
    (SuSE?) Linux (version 8.2?) there are actually 2 versions of autofs
    provided: the default version 3.x and the optional version 4.x. My
    understanding was that (at least at that time) the 3.x version of autofs
    was known not to handle direct maps, but only indirect maps (gotta have
    /home directories, or it's not much use, right?). This person told me that
    he had managed to get direct mounts to work (with Sun Solaris NFS servers,
    too), by substituting the optional 4.x autofs for the default installation
    3.x autofs. Maybe that is related to your problem, too?

    Which Linux distro are you using? What version? You say you are using
    autofs-3.1.7. Do you have (optional) an autofs-4.x in the distro?

    I have upgraded my desktop PCs to SuSE 9.1, but haven't had time to retest
    those allegations. I expect I'll get to it soon, but maybe not soon enough
    for you. I also would like to have automounter direct maps work correctly.

    p.s. I don't know what the big deal is with direct maps? Why are they
    (substantially?) different in the Linux implementation from indirect (like
    /home/*) maps? Is this an intentional functional restriction? Is it a
    performance issue? Was this a (serious?) bug? Mysterious, and annoying.
    Juhan Leemet, Oct 1, 2004
  4. OP was using indirect map, which is perfectly supported.
    Andrei Ivanov, Oct 1, 2004
  5. anon

    anon Guest

    AI > Perhaps you should put mount options into map, not into

    The maps are already out there... This would mean changing all of them and
    having to apply the options to each entry within each map in order to work
    around the "flaw" I found in Linux. Not very nice, but probably would work.

    By the way. the 3.1.7 automount I was running (RH 7.3) apparently had a
    defect in the autofs startup script that caused it to reject a valid syntax.
    It can easily be fixed by modifying the script to eat the "-". It looks
    like the writers of automount goofed as to what the syntax for the map
    qualifiers are... getting rid of the "-" (according to the man page) changes
    the context of the options from be "a map option" to being "a mount
    option"... but automount applies the "mount options" to every entry in the
    map which seems to have the desired map option effect. Seems to me to be a
    really weird screw-up... but then again the sun man page leave unspecified
    whether the map options to there automount command are supposed to have a
    "-" dash infront of them or not... but all of sun's examples show that they

    I took a look at the 4.x version that is part of Fedora Core 2 and it has
    fix the behavior (but you have to enable the fix by setting configuration
    symbol... sorry, I forgot the name and where it is to be set). Once this is
    done the automount, happily

    By the way, I also had problem with the silly (Linux 3.1.7) automount
    interpreting things like
    foo -ftype=autofs bar
    as saying to look for the map as a file called bar even though the
    nsswitch.conf file was set up as "automount: nis". This would mean that I
    would have to have too different maps: one for Solaris that was as written
    above and one for Linux that read "foo -ftype=autofs yp:bar". This is yet
    another incompatibility between linux's automount and the specification it
    clames to be a subset of (things that are incompatible are not a

    But again checking Fedora, I found that this problem had been fixed as well.
    Whoever it is maintaining automount for Linux is doing a bang up job fixing
    the screw-up that crept into the earlier versions!
    anon, Oct 1, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.