How to specify a different home directory for an LDAP user on a local host

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












So after reading all of the directory edit of an LDAP user my question still isn't answered. I need to change an LDAP users home directory on just certain servers without changing it for every server. Obviously I can't "add" the user while the host is connected via LDAP and when I try to manually edit the /etc/passwd file and then login the server says "user not found". I have seen where the user is created locally before connecting the server to LDAP it works (I think) however I was hoping no to have to go that far. Would it be something as simple as stopping SSSD, creating the user locally with the correct path, and then restarting it?



Cheers!







share|improve this question
























    up vote
    0
    down vote

    favorite












    So after reading all of the directory edit of an LDAP user my question still isn't answered. I need to change an LDAP users home directory on just certain servers without changing it for every server. Obviously I can't "add" the user while the host is connected via LDAP and when I try to manually edit the /etc/passwd file and then login the server says "user not found". I have seen where the user is created locally before connecting the server to LDAP it works (I think) however I was hoping no to have to go that far. Would it be something as simple as stopping SSSD, creating the user locally with the correct path, and then restarting it?



    Cheers!







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      So after reading all of the directory edit of an LDAP user my question still isn't answered. I need to change an LDAP users home directory on just certain servers without changing it for every server. Obviously I can't "add" the user while the host is connected via LDAP and when I try to manually edit the /etc/passwd file and then login the server says "user not found". I have seen where the user is created locally before connecting the server to LDAP it works (I think) however I was hoping no to have to go that far. Would it be something as simple as stopping SSSD, creating the user locally with the correct path, and then restarting it?



      Cheers!







      share|improve this question












      So after reading all of the directory edit of an LDAP user my question still isn't answered. I need to change an LDAP users home directory on just certain servers without changing it for every server. Obviously I can't "add" the user while the host is connected via LDAP and when I try to manually edit the /etc/passwd file and then login the server says "user not found". I have seen where the user is created locally before connecting the server to LDAP it works (I think) however I was hoping no to have to go that far. Would it be something as simple as stopping SSSD, creating the user locally with the correct path, and then restarting it?



      Cheers!









      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 30 '17 at 17:17









      J Telep

      1025




      1025




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          You can stop the /etc/nsswitch to look against ldap from:



          passwd: files ldap


          to



          passwd: files


          You don't need to restart anything.
          At this point you can just



          useradd <user>


          Then you can re-add the look up over ldap in the nsswitch.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401452%2fhow-to-specify-a-different-home-directory-for-an-ldap-user-on-a-local-host%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            You can stop the /etc/nsswitch to look against ldap from:



            passwd: files ldap


            to



            passwd: files


            You don't need to restart anything.
            At this point you can just



            useradd <user>


            Then you can re-add the look up over ldap in the nsswitch.






            share|improve this answer
























              up vote
              0
              down vote













              You can stop the /etc/nsswitch to look against ldap from:



              passwd: files ldap


              to



              passwd: files


              You don't need to restart anything.
              At this point you can just



              useradd <user>


              Then you can re-add the look up over ldap in the nsswitch.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                You can stop the /etc/nsswitch to look against ldap from:



                passwd: files ldap


                to



                passwd: files


                You don't need to restart anything.
                At this point you can just



                useradd <user>


                Then you can re-add the look up over ldap in the nsswitch.






                share|improve this answer












                You can stop the /etc/nsswitch to look against ldap from:



                passwd: files ldap


                to



                passwd: files


                You don't need to restart anything.
                At this point you can just



                useradd <user>


                Then you can re-add the look up over ldap in the nsswitch.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 19 at 18:23









                GoingSolo

                1033




                1033



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401452%2fhow-to-specify-a-different-home-directory-for-an-ldap-user-on-a-local-host%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    The Forum (Inglewood, California)

                    Palaiologos