Bash cannot act as nobody and nogroup?

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












8














I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file.
My first thought was to:



$ sudo su nobody
This account is currently not available.









share|improve this question




























    8














    I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file.
    My first thought was to:



    $ sudo su nobody
    This account is currently not available.









    share|improve this question


























      8












      8








      8


      4





      I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file.
      My first thought was to:



      $ sudo su nobody
      This account is currently not available.









      share|improve this question















      I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file.
      My first thought was to:



      $ sudo su nobody
      This account is currently not available.






      bash shell users privileges






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 15 '15 at 23:58









      Thomas Dickey

      52k594164




      52k594164










      asked Aug 11 '15 at 20:33









      ThorSummoner

      1,22741629




      1,22741629




















          2 Answers
          2






          active

          oldest

          votes


















          15














          You have a way simpler solution, just run: su -s /bin/bash nobody (replace /bin/bash with the shell of your choice).



          The This account is currently not available. error is due to the fact that nobody user default shell is /usr/sbin/nologin, su -s force the system to use another shell.






          share|improve this answer






























            8














            An email thread:



            • http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html

            • http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html

            .. points out that sudo -u nobody [cmd ...] can be used:



            (Combined with the trick of How to append to a file as sudo)



            echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log





            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',
              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%2f222602%2fbash-cannot-act-as-nobody-and-nogroup%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              15














              You have a way simpler solution, just run: su -s /bin/bash nobody (replace /bin/bash with the shell of your choice).



              The This account is currently not available. error is due to the fact that nobody user default shell is /usr/sbin/nologin, su -s force the system to use another shell.






              share|improve this answer



























                15














                You have a way simpler solution, just run: su -s /bin/bash nobody (replace /bin/bash with the shell of your choice).



                The This account is currently not available. error is due to the fact that nobody user default shell is /usr/sbin/nologin, su -s force the system to use another shell.






                share|improve this answer

























                  15












                  15








                  15






                  You have a way simpler solution, just run: su -s /bin/bash nobody (replace /bin/bash with the shell of your choice).



                  The This account is currently not available. error is due to the fact that nobody user default shell is /usr/sbin/nologin, su -s force the system to use another shell.






                  share|improve this answer














                  You have a way simpler solution, just run: su -s /bin/bash nobody (replace /bin/bash with the shell of your choice).



                  The This account is currently not available. error is due to the fact that nobody user default shell is /usr/sbin/nologin, su -s force the system to use another shell.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Dec 13 at 10:37









                  GAD3R

                  25.3k1750106




                  25.3k1750106










                  answered Jan 19 '16 at 20:26









                  Hartator

                  26623




                  26623























                      8














                      An email thread:



                      • http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html

                      • http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html

                      .. points out that sudo -u nobody [cmd ...] can be used:



                      (Combined with the trick of How to append to a file as sudo)



                      echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log





                      share|improve this answer



























                        8














                        An email thread:



                        • http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html

                        • http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html

                        .. points out that sudo -u nobody [cmd ...] can be used:



                        (Combined with the trick of How to append to a file as sudo)



                        echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log





                        share|improve this answer

























                          8












                          8








                          8






                          An email thread:



                          • http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html

                          • http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html

                          .. points out that sudo -u nobody [cmd ...] can be used:



                          (Combined with the trick of How to append to a file as sudo)



                          echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log





                          share|improve this answer














                          An email thread:



                          • http://www.sudo.ws/pipermail/sudo-users/2002-September/001225.html

                          • http://www.sudo.ws/pipermail/sudo-users/2002-September/001226.html

                          .. points out that sudo -u nobody [cmd ...] can be used:



                          (Combined with the trick of How to append to a file as sudo)



                          echo "Hello World" | sudo -u nobody tee -a /tmp/logfile.log






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Mar 20 '17 at 10:18









                          Community

                          1




                          1










                          answered Aug 11 '15 at 20:33









                          ThorSummoner

                          1,22741629




                          1,22741629



























                              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%2f222602%2fbash-cannot-act-as-nobody-and-nogroup%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

                              How to check contact read email or not when send email to Individual?

                              Bahrain

                              Postfix configuration issue with fips on centos 7; mailgun relay