Professional Web Applications Themes

automount and NIS issue - Linux Setup, Configuration & Administration

Hello All i have a problem with an automount map. I get "No such file or directory" when I try to cd in to the directory. If I set this map up without using NIS it works fine. The behaviour is the same on the NIS master and the clients.The NIS master is a Redhat 8.0 box and the client is a solaris 8 box. Some outputs nisclient% ypcat auto_apps_cheney | grep netscape -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape [rootnismaster /]# ypcat auto_apps_cheney | grep netscape -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape nisclient% ypmatch netscape auto_apps_cheney Can't match key netscape in map auto_apps_cheney. Reason: no such key in ...

  1. #1

    Default automount and NIS issue

    Hello All

    i have a problem with an automount map. I get "No such file or
    directory" when I try to cd in to the directory. If I set this map up
    without using NIS it works fine. The behaviour is the same on the NIS
    master and the clients.The NIS master is a Redhat 8.0 box and the
    client is a solaris 8 box.

    Some outputs
    nisclient% ypcat auto_apps_cheney | grep netscape
    -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape

    [rootnismaster /]# ypcat auto_apps_cheney | grep netscape
    -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape

    nisclient% ypmatch netscape auto_apps_cheney
    Can't match key netscape in map auto_apps_cheney. Reason: no such key
    in map.

    [rootnisserver /]# ypmatch netscape auto_apps_cheney
    Can't match key netscape in map auto_apps_cheney. Reason: No such key
    in map

    The relevant bit from the Makfile

    auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    echo "Updating $..."
    -sed -e "/^#/d" -e s/#.*$$// $(AUTO_APPS) | $(DBLOAD) \
    -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $

    I have another automount map called auto_proj which works just fine.

    Any/all suggestions welcome
    Binner Guest

  2. #2

    Default Re: automount and NIS issue

    Binner <binnertalk21.com> wrote:
    > i have a problem with an automount map. I get "No such file or
    > directory" when I try to cd in to the directory. If I set this map up
    > without using NIS it works fine. The behaviour is the same on the NIS
    > master and the clients.The NIS master is a Redhat 8.0 box and the
    > client is a solaris 8 box.
    > nisclient% ypcat auto_apps_cheney | grep netscape
    > -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape
    Would you do that with "ypcat -k", please.
    > [rootnismaster /]# ypcat auto_apps_cheney | grep netscape
    > -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape
    > nisclient% ypmatch netscape auto_apps_cheney
    > Can't match key netscape in map auto_apps_cheney. Reason: no such key
    > in map.
    Yes, well, that's your problem. You built the map wrong.
    > [rootnisserver /]# ypmatch netscape auto_apps_cheney
    > Can't match key netscape in map auto_apps_cheney. Reason: No such key
    > in map
    > The relevant bit from the Makfile
    > auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    > echo "Updating $..."
    > -sed -e "/^#/d" -e s/#.*$$// $(AUTO_APPS) | $(DBLOAD) \
    > -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    > -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $
    No good without showeing the map original. Do the -k.

    Peter
    Peter T. Breuer Guest

  3. #3

    Default Re: automount and NIS issue

    here is the ypcat -k

    nisclient% ypcat -k auto_apps_cheney | grep netscape
    netscape -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape

    thanks for helping
    Binner Guest

  4. #4

    Default Re: automount and NIS issue

    Binner <binnertalk21.com> wrote:
    > here is the ypcat -k
    > nisclient% ypcat -k auto_apps_cheney | grep netscape
    > netscape -rw,intr,actimeo=160,timeo=900 nfshost:/remote/apps/netscape
    Pass it through od -a so we can see better. You have an invisible
    character the wrong side of the tab, probably.

    Peter
    Peter T. Breuer Guest

  5. #5

    Default Re: automount and NIS issue

    Here is the od ouput (didn't have a -a option so -c seemed the most appropriate)

    nisclient%ypcat -k auto_apps_cheney | grep netscape | od -c
    0000000 n e t s c a p e
    0000020 - r w , i n t r , a c t i m
    0000040 e o = 1 6 0 , t i m e o = 9 0 0
    0000060 \t s w i n d m 1 - 2 4 : / r e m
    0000100 o t e / a p p s / n e t s c a p
    0000120 e \n
    0000122


    Can you explain what you meant in the last post ?

    Did you mean add the grep statement into the makefile ?

    If so where ?

    thanks
    Binner Guest

  6. #6

    Default Re: automount and NIS issue

    I have fixed it.

    Thanks to Peter for the tip.

    To make the file more readable it had been formatted with spaces and
    tabs to line everything up. I removed all the whitespaces from the
    file and ran make and now it works.

    Thanks again
    Binner Guest

  7. #7

    Default Re: automount and NIS issue

    Binner <binnertalk21.com> wrote:
    > Here is the od ouput (didn't have a -a option so -c seemed the most appropriate)
    > nisclient%ypcat -k auto_apps_cheney | grep netscape | od -c
    od -a is what I asked for.
    > 0000000 n e t s c a p e
    > 0000020 - r w , i n t r , a c t i m
    yes, you can see 10 spaces. There should be only ONE.
    > 0000040 e o = 1 6 0 , t i m e o = 9 0 0
    > 0000060 \t s w i n d m 1 - 2 4 : / r e m
    > 0000100 o t e / a p p s / n e t s c a p
    > 0000120 e \n
    > 0000122
    > Can you explain what you meant in the last post ?
    What did I say in the last post? Please quote context! How are people
    (including me) supposed to follow?
    > Did you mean add the grep statement into the makefile ?
    What? Oh, I see, yes. The Makefile for the NIS maps. I'd put an extra
    command in the pipe to remove empty lines. And after seeing your output
    above, I'd make sure that spaces were compressed too!
    > If so where ?
    What do you mean? I'm gaplumpfed by such a stupid question from someone
    who has apparently got brains! In the appropriate place, obviously.

    Peter
    Peter T. Breuer Guest

  8. #8

    Default Re: automount and NIS issue

    Binner <binnertalk21.com> wrote:
    > To make the file more readable it had been formatted with spaces and
    > tabs to line everything up. I removed all the whitespaces from the
    > file and ran make and now it works.
    No - the correct solution is to fix your Makefile. Utilities shoudl be
    liberal in what they accept and conservative in what they produce. Your
    Makefile stanza is insufficiently liberal - it doesn't cope with too
    much whitespace in its input.

    That's trivial to fix, so fix.

    I also suggested you remove empty lines.

    Peter
    Peter T. Breuer Guest

  9. #9

    Default Re: automount and NIS issue

    Binner wrote:
    > I have fixed it.
    >
    > Thanks to Peter for the tip.
    >
    > To make the file more readable it had been formatted with spaces and
    > tabs to line everything up. I removed all the whitespaces from the
    > file and ran make and now it works.
    >
    > Thanks again
    *OUCH*. Yeah, that sort of thing can creep in if you're not careful.

    If you're concerned about it happening, you might slip a test into your
    /var/yp/Makefile to verify the format of your source files. I've
    occasionally done things like that where in a shared environment, the
    other admins weren't aware of the potential peoblem with slight
    formatting errors.

    Nico Kadel-Garcia Guest

  10. #10

    Default Re: automount and NIS issue

    >
    > No - the correct solution is to fix your Makefile. Utilities shoudl be
    > liberal in what they accept and conservative in what they produce. Your
    > Makefile stanza is insufficiently liberal - it doesn't cope with too
    > much whitespace in its input.
    >
    > That's trivial to fix, so fix.
    >
    it may be trivial to you but not to me.

    How do I fix the makefile ?

    Apologies for any lack of clarity in previous posts but this is my
    first use of a news group

    thanks
    Binner Guest

  11. #11

    Default Re: automount and NIS issue

    It was really annoying as the map with formatting works fine on a
    solaris NIS master. The linux make must be fussier about spaces in
    the automount maps.

    I will have another look at the Makefile on the linux box and see if
    it can be made more tolerant.
    Binner Guest

  12. #12

    Default Re: automount and NIS issue

    First attempt at fixing the Makefile

    it did look like this

    auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    echo "Updating $..."
    -sed -e "/^#/d" -e 's/#.*$$//' $(AUTO_APPS) | $(DBLOAD) \
    -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $

    now it looks like this

    auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    echo "Updating $..."
    -sed -e "/^#/d" -e 's/#.*$$//' -e 's/ //g' $(AUTO_APPS) |
    $(DBLOAD) \
    -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $

    i have added


    -e 's/ //g'

    This removes all the whitespaces. Unfortunatley this broke 4 line in
    another map. The line that were broken has whitespaces separating the
    server:/mountpoint from the options so I shall try replacing the
    whitespces with tabs and see if that makes any difference
    Binner Guest

  13. #13

    Default Re: automount and NIS issue

    Binner <binnertalk21.com> wrote:
    > First attempt at fixing the Makefile
    > it did look like this
    > auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    > echo "Updating $..."
    > -sed -e "/^#/d" -e 's/#.*$$//' $(AUTO_APPS) | $(DBLOAD) \
    > -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    > -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $
    > now it looks like this
    > auto_apps_cheney: $(AUTO_APPS) $(YPDIR)/Makefile
    > echo "Updating $..."
    > -sed -e "/^#/d" -e 's/#.*$$//' -e 's/ //g' $(AUTO_APPS) |
    > $(DBLOAD) \
    > -i $(AUTO_APPS) -o $(YPMAPDIR)/$ - $
    > -$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $
    > i have added
    > -e 's/ //g'
    This is silly. Why didn't you add a "tr -s ' '" as I suggested (shrink
    whitespaces) plus the grep -v '^ *$' ???
    > This removes all the whitespaces. Unfortunatley this broke 4 line in
    It's silly. You don't want to do that! Your problem is with extra space
    in the key portion. Nothing else.

    Peter
    Peter T. Breuer Guest

  14. #14

    Default Re: automount and NIS issue

    Peter T. Breuer wrote:
    > This is silly. Why didn't you add a "tr -s ' '" as I suggested (shrink
    > whitespaces) plus the grep -v '^ *$' ???
    This sort of silliness is why you have to look twice at your scripts.
    Namely, this doesn't get rid of "[tab][space]", its reverse, or blank
    lines. Those sorts of things especially creep in when people unfamiliar
    with such tools start manipulating them by hand.

    I'd actually recommend using a decent configuration tool, such as
    webmin, which does some sanity checking of the records you might create
    in things like /etc/passwd or /var/yp/src/passwd (depending on your
    configuration).

    Also, if you need to do such sanity checking, I'd avoid editing the
    files from the Makefile. Instead, simply do the sanity checking and
    *report* the error so you know to go and fix it.

    These sorts of issues are why the fellow was asking for help: a bit of
    experience is incredibly useful with this sort of question.

    Nico Kadel-Garcia Guest

  15. #15

    Default Re: automount and NIS issue

    Nico Kadel-Garcia <nkadelverizon.net> wrote:
    > Peter T. Breuer wrote:
    >> This is silly. Why didn't you add a "tr -s ' '" as I suggested (shrink
    >> whitespaces) plus the grep -v '^ *$' ???
    > This sort of silliness is why you have to look twice at your scripts.
    > Namely, this doesn't get rid of "[tab][space]", its reverse, or blank
    Sure it does. Let him put space and tab in the tr if he wants - I'm not
    going to write it out for him! He has his own brain. For me to try and
    get him to copy exactly different sorts of whitespace off the newsreader
    is a waste of time! Let him write what he wants, given the indications
    above.
    > lines. Those sorts of things especially creep in when people unfamiliar
    Eh? It precisely gets rid of empty lines.
    > with such tools start manipulating them by hand.
    I don't understand.
    > Also, if you need to do such sanity checking, I'd avoid editing the
    > files from the Makefile. Instead, simply do the sanity checking and
    I don't understand here either. The files have to be preprocessed
    before passing them into his db creator. The idea is to process them in
    a liberal way.

    Peter
    Peter T. Breuer Guest

Similar Threads

  1. Automount problem (structure below mount point)
    By Tim Day in forum Linux Setup, Configuration & Administration
    Replies: 1
    Last Post: August 15th, 11:05 AM
  2. ted NFS & Automount hangs
    By Rubens S. Gomes in forum Sun Solaris
    Replies: 0
    Last Post: July 27th, 05:54 PM
  3. automount permissions problem
    By Neal Lippman in forum Debian
    Replies: 2
    Last Post: July 27th, 11:10 AM
  4. Automount
    By JZidar in forum Debian
    Replies: 5
    Last Post: July 4th, 05:20 PM
  5. automount on AIX 4.3.3
    By Steve Nottingham in forum AIX
    Replies: 0
    Last Post: June 26th, 10:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139