su: Permission denied despite correct password The 2019 Stack Overflow Developer Survey...

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

Who or what is the being for whom Being is a question for Heidegger?

How to copy the contents of all files with a certain name into a new file?

Would an alien lifeform be able to achieve space travel if lacking in vision?

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

Do working physicists consider Newtonian mechanics to be "falsified"?

How should I replace vector<uint8_t>::const_iterator in an API?

Can the DM override racial traits?

does high air pressure throw off wheel balance?

Single author papers against my advisor's will?

How long does the line of fire that you can create as an action using the Investiture of Flame spell last?

Four Colour Theorem

Windows 10: How to Lock (not sleep) laptop on lid close?

I could not break this equation. Please help me

How do I add random spotting to the same face in cycles?

How many people can fit inside Mordenkainen's Magnificent Mansion?

How to split my screen on my Macbook Air?

What's the point in a preamp?

First use of “packing” as in carrying a gun

Can withdrawing asylum be illegal?

University's motivation for having tenure-track positions

He got a vote 80% that of Emmanuel Macron’s

Wall plug outlet change

Relations between two reciprocal partial derivatives?



su: Permission denied despite correct password



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election ResultsBooted from NFS Linux has no permission for su commandWhere does sudo get the currently logged in username from?Break write permission for non root user?Why root can't open pseudo terminal device? (permission denied)Why do I get “Permission Denied” errors even though I have group permission?SCP stopped working: Permission denied, please try againTo Rsync files where permission deniedPermission denied when copying content of one file to othersudo: unable to stat /etc/sudoers: Permission denied … Mint 18.2 CinnamonRoot gets permission denied when executing commands from script but not from shellCould not chdir to home directory /home/user: Permission denied





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







9















In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried reinstalling the package containng /bin/su.



EDIT: sudo works.










share|improve this question

























  • Are you able to su from root to another user?

    – michas
    Jan 20 '13 at 3:15


















9















In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried reinstalling the package containng /bin/su.



EDIT: sudo works.










share|improve this question

























  • Are you able to su from root to another user?

    – michas
    Jan 20 '13 at 3:15














9












9








9


5






In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried reinstalling the package containng /bin/su.



EDIT: sudo works.










share|improve this question
















In my new Gentoo installation, su doesn't work as my non-root user: After entering the correct password I get the message "su: Permission denied". What could be causing this? I have already tried reinstalling the package containng /bin/su.



EDIT: sudo works.







permissions su






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 20 '13 at 1:18







Erik

















asked Jan 20 '13 at 0:53









ErikErik

1,23421027




1,23421027













  • Are you able to su from root to another user?

    – michas
    Jan 20 '13 at 3:15



















  • Are you able to su from root to another user?

    – michas
    Jan 20 '13 at 3:15

















Are you able to su from root to another user?

– michas
Jan 20 '13 at 3:15





Are you able to su from root to another user?

– michas
Jan 20 '13 at 3:15










4 Answers
4






active

oldest

votes


















13














I solved the same problem by editing



 /etc/pam.d/su


and commenting out this line:



auth       required     pam_wheel.so use_uid


It requires users to be in the wheel group to be able to switch user.
User switching as non-root works again when this pam module is disabled for su.



The alternative is to add the user to the wheel group, of course (gentoo recommends this)






share|improve this answer


























  • I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

    – Eric Leschinski
    Jul 7 '18 at 12:25



















8














There could be many problems. Check some of these items, using the hypothetical user, erik:




  1. Is erik a member of the wheel group (groups)?

  2. Are you providing the root password? (And not the password for erik)

  3. Does /bin/su have these privileges: rwsr-xr-x (Is it setuid root? ls -l /bin/su)

  4. Can you log in as root via the console?

  5. Have you looked at the logs for a clue in an error message?

  6. Have you turned on grsecurity in the kernel?

  7. Did it ever work? If so, when did it break?

  8. What happens if erik does a sudo su -?






share|improve this answer

































    2














    There could be many reasons. It's very likely that the reason appears in the system logs. Look in /var/log for files that got modified at the time of an su attempt (the file name depends on your syslog configuration). If you have trouble interpreting log entries, copy-paste them into your question.






    share|improve this answer

































      0














      I compiled shadow in the course of building Linux From Scratch 8.4, and I could login as root or an unprivileged user, but couldn't su from unprivileged user to root, as for Erik above. It turned out the su binary was owned by my unprivileged user. It worked after I chowned the su binary to root, and did 'chmod u+s' on the su binary.






      share|improve this answer








      New contributor




      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















      • That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

        – RalfFriedl
        1 min ago












      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',
      autoActivateHeartbeat: false,
      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%2f61876%2fsu-permission-denied-despite-correct-password%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      13














      I solved the same problem by editing



       /etc/pam.d/su


      and commenting out this line:



      auth       required     pam_wheel.so use_uid


      It requires users to be in the wheel group to be able to switch user.
      User switching as non-root works again when this pam module is disabled for su.



      The alternative is to add the user to the wheel group, of course (gentoo recommends this)






      share|improve this answer


























      • I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

        – Eric Leschinski
        Jul 7 '18 at 12:25
















      13














      I solved the same problem by editing



       /etc/pam.d/su


      and commenting out this line:



      auth       required     pam_wheel.so use_uid


      It requires users to be in the wheel group to be able to switch user.
      User switching as non-root works again when this pam module is disabled for su.



      The alternative is to add the user to the wheel group, of course (gentoo recommends this)






      share|improve this answer


























      • I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

        – Eric Leschinski
        Jul 7 '18 at 12:25














      13












      13








      13







      I solved the same problem by editing



       /etc/pam.d/su


      and commenting out this line:



      auth       required     pam_wheel.so use_uid


      It requires users to be in the wheel group to be able to switch user.
      User switching as non-root works again when this pam module is disabled for su.



      The alternative is to add the user to the wheel group, of course (gentoo recommends this)






      share|improve this answer















      I solved the same problem by editing



       /etc/pam.d/su


      and commenting out this line:



      auth       required     pam_wheel.so use_uid


      It requires users to be in the wheel group to be able to switch user.
      User switching as non-root works again when this pam module is disabled for su.



      The alternative is to add the user to the wheel group, of course (gentoo recommends this)







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Jul 7 '18 at 11:11

























      answered Jun 27 '13 at 23:26









      TheJJTheJJ

      24526




      24526













      • I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

        – Eric Leschinski
        Jul 7 '18 at 12:25



















      • I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

        – Eric Leschinski
        Jul 7 '18 at 12:25

















      I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

      – Eric Leschinski
      Jul 7 '18 at 12:25





      I was going to update your other questions/answers since this one was so good, you only have one answer over the last 5 years? You need to up those numbers bro, those are rookie numbers.

      – Eric Leschinski
      Jul 7 '18 at 12:25













      8














      There could be many problems. Check some of these items, using the hypothetical user, erik:




      1. Is erik a member of the wheel group (groups)?

      2. Are you providing the root password? (And not the password for erik)

      3. Does /bin/su have these privileges: rwsr-xr-x (Is it setuid root? ls -l /bin/su)

      4. Can you log in as root via the console?

      5. Have you looked at the logs for a clue in an error message?

      6. Have you turned on grsecurity in the kernel?

      7. Did it ever work? If so, when did it break?

      8. What happens if erik does a sudo su -?






      share|improve this answer






























        8














        There could be many problems. Check some of these items, using the hypothetical user, erik:




        1. Is erik a member of the wheel group (groups)?

        2. Are you providing the root password? (And not the password for erik)

        3. Does /bin/su have these privileges: rwsr-xr-x (Is it setuid root? ls -l /bin/su)

        4. Can you log in as root via the console?

        5. Have you looked at the logs for a clue in an error message?

        6. Have you turned on grsecurity in the kernel?

        7. Did it ever work? If so, when did it break?

        8. What happens if erik does a sudo su -?






        share|improve this answer




























          8












          8








          8







          There could be many problems. Check some of these items, using the hypothetical user, erik:




          1. Is erik a member of the wheel group (groups)?

          2. Are you providing the root password? (And not the password for erik)

          3. Does /bin/su have these privileges: rwsr-xr-x (Is it setuid root? ls -l /bin/su)

          4. Can you log in as root via the console?

          5. Have you looked at the logs for a clue in an error message?

          6. Have you turned on grsecurity in the kernel?

          7. Did it ever work? If so, when did it break?

          8. What happens if erik does a sudo su -?






          share|improve this answer















          There could be many problems. Check some of these items, using the hypothetical user, erik:




          1. Is erik a member of the wheel group (groups)?

          2. Are you providing the root password? (And not the password for erik)

          3. Does /bin/su have these privileges: rwsr-xr-x (Is it setuid root? ls -l /bin/su)

          4. Can you log in as root via the console?

          5. Have you looked at the logs for a clue in an error message?

          6. Have you turned on grsecurity in the kernel?

          7. Did it ever work? If so, when did it break?

          8. What happens if erik does a sudo su -?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 18 '16 at 20:40

























          answered Jan 20 '13 at 3:17









          ChristopherChristopher

          10.9k33349




          10.9k33349























              2














              There could be many reasons. It's very likely that the reason appears in the system logs. Look in /var/log for files that got modified at the time of an su attempt (the file name depends on your syslog configuration). If you have trouble interpreting log entries, copy-paste them into your question.






              share|improve this answer






























                2














                There could be many reasons. It's very likely that the reason appears in the system logs. Look in /var/log for files that got modified at the time of an su attempt (the file name depends on your syslog configuration). If you have trouble interpreting log entries, copy-paste them into your question.






                share|improve this answer




























                  2












                  2








                  2







                  There could be many reasons. It's very likely that the reason appears in the system logs. Look in /var/log for files that got modified at the time of an su attempt (the file name depends on your syslog configuration). If you have trouble interpreting log entries, copy-paste them into your question.






                  share|improve this answer















                  There could be many reasons. It's very likely that the reason appears in the system logs. Look in /var/log for files that got modified at the time of an su attempt (the file name depends on your syslog configuration). If you have trouble interpreting log entries, copy-paste them into your question.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 13 '17 at 12:36









                  Community

                  1




                  1










                  answered Jan 20 '13 at 22:53









                  GillesGilles

                  547k13011131630




                  547k13011131630























                      0














                      I compiled shadow in the course of building Linux From Scratch 8.4, and I could login as root or an unprivileged user, but couldn't su from unprivileged user to root, as for Erik above. It turned out the su binary was owned by my unprivileged user. It worked after I chowned the su binary to root, and did 'chmod u+s' on the su binary.






                      share|improve this answer








                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





















                      • That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                        – RalfFriedl
                        1 min ago
















                      0














                      I compiled shadow in the course of building Linux From Scratch 8.4, and I could login as root or an unprivileged user, but couldn't su from unprivileged user to root, as for Erik above. It turned out the su binary was owned by my unprivileged user. It worked after I chowned the su binary to root, and did 'chmod u+s' on the su binary.






                      share|improve this answer








                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





















                      • That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                        – RalfFriedl
                        1 min ago














                      0












                      0








                      0







                      I compiled shadow in the course of building Linux From Scratch 8.4, and I could login as root or an unprivileged user, but couldn't su from unprivileged user to root, as for Erik above. It turned out the su binary was owned by my unprivileged user. It worked after I chowned the su binary to root, and did 'chmod u+s' on the su binary.






                      share|improve this answer








                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.










                      I compiled shadow in the course of building Linux From Scratch 8.4, and I could login as root or an unprivileged user, but couldn't su from unprivileged user to root, as for Erik above. It turned out the su binary was owned by my unprivileged user. It worked after I chowned the su binary to root, and did 'chmod u+s' on the su binary.







                      share|improve this answer








                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|improve this answer



                      share|improve this answer






                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered 43 mins ago









                      John ClarkJohn Clark

                      11




                      11




                      New contributor




                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      John Clark is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.













                      • That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                        – RalfFriedl
                        1 min ago



















                      • That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                        – RalfFriedl
                        1 min ago

















                      That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                      – RalfFriedl
                      1 min ago





                      That's good to know, but unlikely to be the original problem, as it was installed from a package and a different answer was already accepted.

                      – RalfFriedl
                      1 min ago


















                      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.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f61876%2fsu-permission-denied-despite-correct-password%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

                      Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                      Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                      Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m