How to create a custom NIS map?ssh via public key authentication for users administered with NISSwitch from...

Personal Teleportation: From Rags to Riches

Venezuelan girlfriend wants to travel the USA to be with me. What is the process?

Can my sorcerer use a spellbook only to collect spells and scribe scrolls, not cast?

Why is consensus so controversial in Britain?

Am I breaking OOP practice with this architecture?

Ambiguity in the definition of entropy

Extract rows of a table, that include less than x NULLs

Detention in 1997

Why can't we play rap on piano?

What's the in-universe reasoning behind sorcerers needing material components?

Determining Impedance With An Antenna Analyzer

Can compressed videos be decoded back to their uncompresed original format?

Unlock My Phone! February 2018

What does “the session was packed” mean in this context?

How to show a landlord what we have in savings?

Why no variance term in Bayesian logistic regression?

What reasons are there for a Capitalist to oppose a 100% inheritance tax?

How can saying a song's name be a copyright violation?

How much of data wrangling is a data scientist's job?

Valid term from quadratic sequence?

Assassin's bullet with mercury

Arrow those variables!

Examples of smooth manifolds admitting inbetween one and a continuum of complex structures

Which is the best way to check return result?



How to create a custom NIS map?


ssh via public key authentication for users administered with NISSwitch from NIS/NFS to LDAP/NFS/SMB?NIS authorization and adding existing userNIS: which mechanism hides shadow.byname for unpriviledged users?How to have logs about users logins/logouts in a NIS server?How can I change passwords on a Linux NIS master?NIS client doesn't see group namesnobody user/group with NIS/NFSCreate alias for UNIX username in LDAP for DB2Share NIS login using Active Directory













0















I'd like to create a custom NIS map in order to be able to look up my own information using ypmatch and map between local and centralised usernames. How can this be achieved?










share|improve this question














bumped to the homepage by Community 10 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    I'd like to create a custom NIS map in order to be able to look up my own information using ypmatch and map between local and centralised usernames. How can this be achieved?










    share|improve this question














    bumped to the homepage by Community 10 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I'd like to create a custom NIS map in order to be able to look up my own information using ypmatch and map between local and centralised usernames. How can this be achieved?










      share|improve this question














      I'd like to create a custom NIS map in order to be able to look up my own information using ypmatch and map between local and centralised usernames. How can this be achieved?







      nis






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 14 '15 at 9:59









      ralightralight

      1362




      1362





      bumped to the homepage by Community 10 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 10 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          First off, edit /var/yp/Makefile to add in the new map. You’ve probably got something like this:



          PASSWD = $(YPPWDDIR)/passwd


          We need to add a new line for the new map. This is going to be the new username map, so call it usermap.



          USERMAP = $(YPSRCDIR)/usermap


          YPSRCDIR is /etc in my case, but obviously choose the path that suits you the best.



          Now find a line that starts all:. This is the list of maps to update. Add your new map to the end, so it’ll be something like



          all: auto.home auto.master group hosts netgrp passwd usermap


          Further down where there is a group of lines like this:



          passwd:         passwd.byname passwd.byuid


          you should add in your own map:



          usermap : usermap.byname


          The byname part is an indicator for what the map key is and isn’t that important for us.



          You now need to add a section to tell the makefile how to update your map:



          usermap.byname: $(USERMAP) $(YPDIR)/Makefile
          @echo "Updating $@..."
          @$(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$2 != "" )
          print $$1"t"$$2 }' $(USERMAP)
          | $(DBLOAD) -i $(USERMAP) -o $(YPMAPDIR)/$@ - $@
          -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@


          This processes the file /etc/usermap and generates the map file. Essentially you just need to print keytvalue into $(DBLOAD) …. This example extracts data from the file assuming it is in the format key:value.



          Now edit /var/yp/nicknames to add your new map:



          usermap    usermap.byname


          then run make in /var/yp as normal.



          If you have a slave server you’ll probably have a timeout with the new map at this point. To get round this, you need to run ypxfr on the slave to get the map first:



          /usr/lib/yp/ypxfr -d <yp domain> -h <yp master host> usermap.byname





          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f714175%2fhow-to-create-a-custom-nis-map%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            First off, edit /var/yp/Makefile to add in the new map. You’ve probably got something like this:



            PASSWD = $(YPPWDDIR)/passwd


            We need to add a new line for the new map. This is going to be the new username map, so call it usermap.



            USERMAP = $(YPSRCDIR)/usermap


            YPSRCDIR is /etc in my case, but obviously choose the path that suits you the best.



            Now find a line that starts all:. This is the list of maps to update. Add your new map to the end, so it’ll be something like



            all: auto.home auto.master group hosts netgrp passwd usermap


            Further down where there is a group of lines like this:



            passwd:         passwd.byname passwd.byuid


            you should add in your own map:



            usermap : usermap.byname


            The byname part is an indicator for what the map key is and isn’t that important for us.



            You now need to add a section to tell the makefile how to update your map:



            usermap.byname: $(USERMAP) $(YPDIR)/Makefile
            @echo "Updating $@..."
            @$(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$2 != "" )
            print $$1"t"$$2 }' $(USERMAP)
            | $(DBLOAD) -i $(USERMAP) -o $(YPMAPDIR)/$@ - $@
            -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@


            This processes the file /etc/usermap and generates the map file. Essentially you just need to print keytvalue into $(DBLOAD) …. This example extracts data from the file assuming it is in the format key:value.



            Now edit /var/yp/nicknames to add your new map:



            usermap    usermap.byname


            then run make in /var/yp as normal.



            If you have a slave server you’ll probably have a timeout with the new map at this point. To get round this, you need to run ypxfr on the slave to get the map first:



            /usr/lib/yp/ypxfr -d <yp domain> -h <yp master host> usermap.byname





            share|improve this answer




























              0














              First off, edit /var/yp/Makefile to add in the new map. You’ve probably got something like this:



              PASSWD = $(YPPWDDIR)/passwd


              We need to add a new line for the new map. This is going to be the new username map, so call it usermap.



              USERMAP = $(YPSRCDIR)/usermap


              YPSRCDIR is /etc in my case, but obviously choose the path that suits you the best.



              Now find a line that starts all:. This is the list of maps to update. Add your new map to the end, so it’ll be something like



              all: auto.home auto.master group hosts netgrp passwd usermap


              Further down where there is a group of lines like this:



              passwd:         passwd.byname passwd.byuid


              you should add in your own map:



              usermap : usermap.byname


              The byname part is an indicator for what the map key is and isn’t that important for us.



              You now need to add a section to tell the makefile how to update your map:



              usermap.byname: $(USERMAP) $(YPDIR)/Makefile
              @echo "Updating $@..."
              @$(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$2 != "" )
              print $$1"t"$$2 }' $(USERMAP)
              | $(DBLOAD) -i $(USERMAP) -o $(YPMAPDIR)/$@ - $@
              -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@


              This processes the file /etc/usermap and generates the map file. Essentially you just need to print keytvalue into $(DBLOAD) …. This example extracts data from the file assuming it is in the format key:value.



              Now edit /var/yp/nicknames to add your new map:



              usermap    usermap.byname


              then run make in /var/yp as normal.



              If you have a slave server you’ll probably have a timeout with the new map at this point. To get round this, you need to run ypxfr on the slave to get the map first:



              /usr/lib/yp/ypxfr -d <yp domain> -h <yp master host> usermap.byname





              share|improve this answer


























                0












                0








                0







                First off, edit /var/yp/Makefile to add in the new map. You’ve probably got something like this:



                PASSWD = $(YPPWDDIR)/passwd


                We need to add a new line for the new map. This is going to be the new username map, so call it usermap.



                USERMAP = $(YPSRCDIR)/usermap


                YPSRCDIR is /etc in my case, but obviously choose the path that suits you the best.



                Now find a line that starts all:. This is the list of maps to update. Add your new map to the end, so it’ll be something like



                all: auto.home auto.master group hosts netgrp passwd usermap


                Further down where there is a group of lines like this:



                passwd:         passwd.byname passwd.byuid


                you should add in your own map:



                usermap : usermap.byname


                The byname part is an indicator for what the map key is and isn’t that important for us.



                You now need to add a section to tell the makefile how to update your map:



                usermap.byname: $(USERMAP) $(YPDIR)/Makefile
                @echo "Updating $@..."
                @$(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$2 != "" )
                print $$1"t"$$2 }' $(USERMAP)
                | $(DBLOAD) -i $(USERMAP) -o $(YPMAPDIR)/$@ - $@
                -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@


                This processes the file /etc/usermap and generates the map file. Essentially you just need to print keytvalue into $(DBLOAD) …. This example extracts data from the file assuming it is in the format key:value.



                Now edit /var/yp/nicknames to add your new map:



                usermap    usermap.byname


                then run make in /var/yp as normal.



                If you have a slave server you’ll probably have a timeout with the new map at this point. To get round this, you need to run ypxfr on the slave to get the map first:



                /usr/lib/yp/ypxfr -d <yp domain> -h <yp master host> usermap.byname





                share|improve this answer













                First off, edit /var/yp/Makefile to add in the new map. You’ve probably got something like this:



                PASSWD = $(YPPWDDIR)/passwd


                We need to add a new line for the new map. This is going to be the new username map, so call it usermap.



                USERMAP = $(YPSRCDIR)/usermap


                YPSRCDIR is /etc in my case, but obviously choose the path that suits you the best.



                Now find a line that starts all:. This is the list of maps to update. Add your new map to the end, so it’ll be something like



                all: auto.home auto.master group hosts netgrp passwd usermap


                Further down where there is a group of lines like this:



                passwd:         passwd.byname passwd.byuid


                you should add in your own map:



                usermap : usermap.byname


                The byname part is an indicator for what the map key is and isn’t that important for us.



                You now need to add a section to tell the makefile how to update your map:



                usermap.byname: $(USERMAP) $(YPDIR)/Makefile
                @echo "Updating $@..."
                @$(AWK) -F: '!/^[-+#]/ { if ($$1 != "" && $$2 != "" )
                print $$1"t"$$2 }' $(USERMAP)
                | $(DBLOAD) -i $(USERMAP) -o $(YPMAPDIR)/$@ - $@
                -@$(NOPUSH) || $(YPPUSH) -d $(DOMAIN) $@


                This processes the file /etc/usermap and generates the map file. Essentially you just need to print keytvalue into $(DBLOAD) …. This example extracts data from the file assuming it is in the format key:value.



                Now edit /var/yp/nicknames to add your new map:



                usermap    usermap.byname


                then run make in /var/yp as normal.



                If you have a slave server you’ll probably have a timeout with the new map at this point. To get round this, you need to run ypxfr on the slave to get the map first:



                /usr/lib/yp/ypxfr -d <yp domain> -h <yp master host> usermap.byname






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 14 '15 at 9:59









                ralightralight

                1362




                1362






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f714175%2fhow-to-create-a-custom-nis-map%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Українські прізвища Зміст Історичні відомості |...