LDAP user does not exist when running 'su'











up vote
2
down vote

favorite












I'm attempting to set up LDAP authentication according to the instructions in Sander Van Vugt's RHCSA/RHCE book for RHEL7. In chapter 6 he explains that when using authconfig-tui the FORCELEGACY option is set to yes in /etc/sysconfig/authconfig. This is supposed to configure nslcd instead of sssd.



I do not see this happening. Perhaps it was that way in 7.0 or even 7.1, but in 7.3 the option is set to no after using authconfig-tui.



If I put aside the nslcd vs sssd confusion and attempt the complete the exercise which leads to running su - lara to authenticate via LDAP to said user, I merely get:



su: user lara does not exist


I've verified that the FreeIPA server is answering queries using ldapsearch and in doing so, confirmed that the user is in LDAP. It seems to me, though, that su is not authenticating against LDAP, but instead /etc/passwd.



My PAM system-auth configuration includes the sssd entries that seem to be necessary:



auth        sufficient    pam_sss.so forward_pass
account [default=bad success=ok user_unknown=ignore] pam.sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so


My /etc/nsswitch.conf file contains:



passwd:    files sss
shadow: files sss
group: files sss


The sssd service is active.



There aren't any log entries in /var/log/* or /var/log/sssd/*. In fact, none of the sssd logs contains anything.



EDIT



After some reading I'm still no closer to a solution to this, however, I do have more information.



I am able to authenticate as user lara if I ssh into the LDAP server. So I know that LDAP is actually working.



I also looked at the PAM config for su. This is pulling in the system-auth file:



auth        substack        system-auth
account include system-auth
password include system-auth
session include system-auth


so it should be making use of the pam_sss.so module implicitly.



Still can't sort it out, though.



EDIT 2



Being able to log into the IPA server either locally or via SSH with user lara, I decided to compare the pam files on it with those on the client. The only difference I was able to determine is that the client contained broken_shadow with the pam_unix.so account entry. I removed it and even rebooted but it didn't fix anything.



How do I disable broken_shadow? I can't find anything about it.










share|improve this question
























  • Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
    – steve
    Apr 28 '17 at 20:15










  • @steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
    – theillien
    Apr 29 '17 at 7:52












  • Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
    – supriady
    Jul 26 at 14:02















up vote
2
down vote

favorite












I'm attempting to set up LDAP authentication according to the instructions in Sander Van Vugt's RHCSA/RHCE book for RHEL7. In chapter 6 he explains that when using authconfig-tui the FORCELEGACY option is set to yes in /etc/sysconfig/authconfig. This is supposed to configure nslcd instead of sssd.



I do not see this happening. Perhaps it was that way in 7.0 or even 7.1, but in 7.3 the option is set to no after using authconfig-tui.



If I put aside the nslcd vs sssd confusion and attempt the complete the exercise which leads to running su - lara to authenticate via LDAP to said user, I merely get:



su: user lara does not exist


I've verified that the FreeIPA server is answering queries using ldapsearch and in doing so, confirmed that the user is in LDAP. It seems to me, though, that su is not authenticating against LDAP, but instead /etc/passwd.



My PAM system-auth configuration includes the sssd entries that seem to be necessary:



auth        sufficient    pam_sss.so forward_pass
account [default=bad success=ok user_unknown=ignore] pam.sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so


My /etc/nsswitch.conf file contains:



passwd:    files sss
shadow: files sss
group: files sss


The sssd service is active.



There aren't any log entries in /var/log/* or /var/log/sssd/*. In fact, none of the sssd logs contains anything.



EDIT



After some reading I'm still no closer to a solution to this, however, I do have more information.



I am able to authenticate as user lara if I ssh into the LDAP server. So I know that LDAP is actually working.



I also looked at the PAM config for su. This is pulling in the system-auth file:



auth        substack        system-auth
account include system-auth
password include system-auth
session include system-auth


so it should be making use of the pam_sss.so module implicitly.



Still can't sort it out, though.



EDIT 2



Being able to log into the IPA server either locally or via SSH with user lara, I decided to compare the pam files on it with those on the client. The only difference I was able to determine is that the client contained broken_shadow with the pam_unix.so account entry. I removed it and even rebooted but it didn't fix anything.



How do I disable broken_shadow? I can't find anything about it.










share|improve this question
























  • Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
    – steve
    Apr 28 '17 at 20:15










  • @steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
    – theillien
    Apr 29 '17 at 7:52












  • Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
    – supriady
    Jul 26 at 14:02













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I'm attempting to set up LDAP authentication according to the instructions in Sander Van Vugt's RHCSA/RHCE book for RHEL7. In chapter 6 he explains that when using authconfig-tui the FORCELEGACY option is set to yes in /etc/sysconfig/authconfig. This is supposed to configure nslcd instead of sssd.



I do not see this happening. Perhaps it was that way in 7.0 or even 7.1, but in 7.3 the option is set to no after using authconfig-tui.



If I put aside the nslcd vs sssd confusion and attempt the complete the exercise which leads to running su - lara to authenticate via LDAP to said user, I merely get:



su: user lara does not exist


I've verified that the FreeIPA server is answering queries using ldapsearch and in doing so, confirmed that the user is in LDAP. It seems to me, though, that su is not authenticating against LDAP, but instead /etc/passwd.



My PAM system-auth configuration includes the sssd entries that seem to be necessary:



auth        sufficient    pam_sss.so forward_pass
account [default=bad success=ok user_unknown=ignore] pam.sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so


My /etc/nsswitch.conf file contains:



passwd:    files sss
shadow: files sss
group: files sss


The sssd service is active.



There aren't any log entries in /var/log/* or /var/log/sssd/*. In fact, none of the sssd logs contains anything.



EDIT



After some reading I'm still no closer to a solution to this, however, I do have more information.



I am able to authenticate as user lara if I ssh into the LDAP server. So I know that LDAP is actually working.



I also looked at the PAM config for su. This is pulling in the system-auth file:



auth        substack        system-auth
account include system-auth
password include system-auth
session include system-auth


so it should be making use of the pam_sss.so module implicitly.



Still can't sort it out, though.



EDIT 2



Being able to log into the IPA server either locally or via SSH with user lara, I decided to compare the pam files on it with those on the client. The only difference I was able to determine is that the client contained broken_shadow with the pam_unix.so account entry. I removed it and even rebooted but it didn't fix anything.



How do I disable broken_shadow? I can't find anything about it.










share|improve this question















I'm attempting to set up LDAP authentication according to the instructions in Sander Van Vugt's RHCSA/RHCE book for RHEL7. In chapter 6 he explains that when using authconfig-tui the FORCELEGACY option is set to yes in /etc/sysconfig/authconfig. This is supposed to configure nslcd instead of sssd.



I do not see this happening. Perhaps it was that way in 7.0 or even 7.1, but in 7.3 the option is set to no after using authconfig-tui.



If I put aside the nslcd vs sssd confusion and attempt the complete the exercise which leads to running su - lara to authenticate via LDAP to said user, I merely get:



su: user lara does not exist


I've verified that the FreeIPA server is answering queries using ldapsearch and in doing so, confirmed that the user is in LDAP. It seems to me, though, that su is not authenticating against LDAP, but instead /etc/passwd.



My PAM system-auth configuration includes the sssd entries that seem to be necessary:



auth        sufficient    pam_sss.so forward_pass
account [default=bad success=ok user_unknown=ignore] pam.sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so


My /etc/nsswitch.conf file contains:



passwd:    files sss
shadow: files sss
group: files sss


The sssd service is active.



There aren't any log entries in /var/log/* or /var/log/sssd/*. In fact, none of the sssd logs contains anything.



EDIT



After some reading I'm still no closer to a solution to this, however, I do have more information.



I am able to authenticate as user lara if I ssh into the LDAP server. So I know that LDAP is actually working.



I also looked at the PAM config for su. This is pulling in the system-auth file:



auth        substack        system-auth
account include system-auth
password include system-auth
session include system-auth


so it should be making use of the pam_sss.so module implicitly.



Still can't sort it out, though.



EDIT 2



Being able to log into the IPA server either locally or via SSH with user lara, I decided to compare the pam files on it with those on the client. The only difference I was able to determine is that the client contained broken_shadow with the pam_unix.so account entry. I removed it and even rebooted but it didn't fix anything.



How do I disable broken_shadow? I can't find anything about it.







rhel ldap sssd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 29 '17 at 8:19

























asked Apr 28 '17 at 5:04









theillien

5663726




5663726












  • Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
    – steve
    Apr 28 '17 at 20:15










  • @steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
    – theillien
    Apr 29 '17 at 7:52












  • Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
    – supriady
    Jul 26 at 14:02


















  • Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
    – steve
    Apr 28 '17 at 20:15










  • @steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
    – theillien
    Apr 29 '17 at 7:52












  • Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
    – supriady
    Jul 26 at 14:02
















Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
– steve
Apr 28 '17 at 20:15




Have a look at the contents of /etc/pam.d/login (which is clearly working) versus /etc/pam.d/su (which is likely wrong in some way)
– steve
Apr 28 '17 at 20:15












@steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
– theillien
Apr 29 '17 at 7:52






@steve /etc/pam.d/login contains the same includes and substack statements as /etc/pam.d/su. I've also attempted to log in directly as user lara on the client side. It didn't even attempt to check LDAP. It simply said Login incorrect because the local user doesn't exist.
– theillien
Apr 29 '17 at 7:52














Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
– supriady
Jul 26 at 14:02




Did you try to login ldap user thru phpldapadmin ? Before you used pam for ldap authentication.
– supriady
Jul 26 at 14:02










1 Answer
1






active

oldest

votes

















up vote
0
down vote













This may be unrelated, but I'm following the same course (with a client Server of my creation) and managed to fix it by doing the following:




  1. Checking everything matched what I'd set in authconfig-tui in /etc/sssd/sssd.conf

  2. Setting the permissions on /etc/sssd/sssd.conf to 0600 (it worked immediately after that) - I'm unsure why this made a difference, given that it only grants user R/W, but I found it under an Oracle guide for RHEL7 SSSD Client configuration: https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-sssd-ldap.html


Hope this helps if you haven't already sorted it!



EDIT: Possible explanation: https://pagure.io/SSSD/sssd/issue/1413






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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f361840%2fldap-user-does-not-exist-when-running-su%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








    up vote
    0
    down vote













    This may be unrelated, but I'm following the same course (with a client Server of my creation) and managed to fix it by doing the following:




    1. Checking everything matched what I'd set in authconfig-tui in /etc/sssd/sssd.conf

    2. Setting the permissions on /etc/sssd/sssd.conf to 0600 (it worked immediately after that) - I'm unsure why this made a difference, given that it only grants user R/W, but I found it under an Oracle guide for RHEL7 SSSD Client configuration: https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-sssd-ldap.html


    Hope this helps if you haven't already sorted it!



    EDIT: Possible explanation: https://pagure.io/SSSD/sssd/issue/1413






    share|improve this answer

























      up vote
      0
      down vote













      This may be unrelated, but I'm following the same course (with a client Server of my creation) and managed to fix it by doing the following:




      1. Checking everything matched what I'd set in authconfig-tui in /etc/sssd/sssd.conf

      2. Setting the permissions on /etc/sssd/sssd.conf to 0600 (it worked immediately after that) - I'm unsure why this made a difference, given that it only grants user R/W, but I found it under an Oracle guide for RHEL7 SSSD Client configuration: https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-sssd-ldap.html


      Hope this helps if you haven't already sorted it!



      EDIT: Possible explanation: https://pagure.io/SSSD/sssd/issue/1413






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        This may be unrelated, but I'm following the same course (with a client Server of my creation) and managed to fix it by doing the following:




        1. Checking everything matched what I'd set in authconfig-tui in /etc/sssd/sssd.conf

        2. Setting the permissions on /etc/sssd/sssd.conf to 0600 (it worked immediately after that) - I'm unsure why this made a difference, given that it only grants user R/W, but I found it under an Oracle guide for RHEL7 SSSD Client configuration: https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-sssd-ldap.html


        Hope this helps if you haven't already sorted it!



        EDIT: Possible explanation: https://pagure.io/SSSD/sssd/issue/1413






        share|improve this answer












        This may be unrelated, but I'm following the same course (with a client Server of my creation) and managed to fix it by doing the following:




        1. Checking everything matched what I'd set in authconfig-tui in /etc/sssd/sssd.conf

        2. Setting the permissions on /etc/sssd/sssd.conf to 0600 (it worked immediately after that) - I'm unsure why this made a difference, given that it only grants user R/W, but I found it under an Oracle guide for RHEL7 SSSD Client configuration: https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-sssd-ldap.html


        Hope this helps if you haven't already sorted it!



        EDIT: Possible explanation: https://pagure.io/SSSD/sssd/issue/1413







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 14 '17 at 5:40









        rgreen92

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2funix.stackexchange.com%2fquestions%2f361840%2fldap-user-does-not-exist-when-running-su%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

            Morgemoulin

            Scott Moir

            Souastre