bash: adduser: command not found on centOS

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












12















I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su - option. I believe it has to do something with path not set properly.



I updated the path and here is what it looks like
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin



I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?










share|improve this question




























    12















    I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su - option. I believe it has to do something with path not set properly.



    I updated the path and here is what it looks like
    /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin



    I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?










    share|improve this question


























      12












      12








      12


      1






      I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su - option. I believe it has to do something with path not set properly.



      I updated the path and here is what it looks like
      /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin



      I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?










      share|improve this question
















      I installed CentOS 5.5 on my VMWare 8 recently and I am trying to add a new user on the system. I am unable to add the user unless I use su - option. I believe it has to do something with path not set properly.



      I updated the path and here is what it looks like
      /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/uone/bin:/sbin



      I believe the command is in /sbin dir which is already a part of path. Can anyone suggest me what else I might be missing?







      shell path






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 27 at 13:24









      Jeff Schaller

      43.9k1161141




      43.9k1161141










      asked Aug 3 '14 at 6:33









      AtulAtul

      4772722




      4772722




















          4 Answers
          4






          active

          oldest

          votes


















          19














          Try adding /usr/sbin to your path.






          share|improve this answer

























          • Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

            – Atul
            Aug 3 '14 at 6:54






          • 1





            How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

            – xiaodai
            Dec 17 '14 at 7:05











          • @xiaodai unix.stackexchange.com/a/26059/24354

            – Hartley Brody
            Oct 20 '15 at 18:41











          • Want to provide an example of that for this to be a complete answer?

            – Henry F
            Feb 28 '17 at 4:01


















          5














          /usr/sbin/useradd username -g groupname -d homedirectory





          share|improve this answer

























          • Its giving me error -bash: /usr/sbin/useradd: No such file or directory

            – Nishad Up
            Feb 20 '18 at 7:51


















          3














          I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):



          yum install shadow-utils





          share|improve this answer






























            -2














            whereis useradd


            this is used to solve that problem






            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%2f148105%2fbash-adduser-command-not-found-on-centos%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









              19














              Try adding /usr/sbin to your path.






              share|improve this answer

























              • Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

                – Atul
                Aug 3 '14 at 6:54






              • 1





                How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

                – xiaodai
                Dec 17 '14 at 7:05











              • @xiaodai unix.stackexchange.com/a/26059/24354

                – Hartley Brody
                Oct 20 '15 at 18:41











              • Want to provide an example of that for this to be a complete answer?

                – Henry F
                Feb 28 '17 at 4:01















              19














              Try adding /usr/sbin to your path.






              share|improve this answer

























              • Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

                – Atul
                Aug 3 '14 at 6:54






              • 1





                How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

                – xiaodai
                Dec 17 '14 at 7:05











              • @xiaodai unix.stackexchange.com/a/26059/24354

                – Hartley Brody
                Oct 20 '15 at 18:41











              • Want to provide an example of that for this to be a complete answer?

                – Henry F
                Feb 28 '17 at 4:01













              19












              19








              19







              Try adding /usr/sbin to your path.






              share|improve this answer















              Try adding /usr/sbin to your path.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Feb 27 at 11:33









              Prvt_Yadv

              2,92531327




              2,92531327










              answered Aug 3 '14 at 6:39









              mdpcmdpc

              5,07621838




              5,07621838












              • Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

                – Atul
                Aug 3 '14 at 6:54






              • 1





                How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

                – xiaodai
                Dec 17 '14 at 7:05











              • @xiaodai unix.stackexchange.com/a/26059/24354

                – Hartley Brody
                Oct 20 '15 at 18:41











              • Want to provide an example of that for this to be a complete answer?

                – Henry F
                Feb 28 '17 at 4:01

















              • Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

                – Atul
                Aug 3 '14 at 6:54






              • 1





                How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

                – xiaodai
                Dec 17 '14 at 7:05











              • @xiaodai unix.stackexchange.com/a/26059/24354

                – Hartley Brody
                Oct 20 '15 at 18:41











              • Want to provide an example of that for this to be a complete answer?

                – Henry F
                Feb 28 '17 at 4:01
















              Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

              – Atul
              Aug 3 '14 at 6:54





              Yep! That did the trick, Added it as priority location in path. Thanks mdpc :)

              – Atul
              Aug 3 '14 at 6:54




              1




              1





              How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

              – xiaodai
              Dec 17 '14 at 7:05





              How would I do that? There is already a PATH = something in my .bash_profile? How do i add another one?

              – xiaodai
              Dec 17 '14 at 7:05













              @xiaodai unix.stackexchange.com/a/26059/24354

              – Hartley Brody
              Oct 20 '15 at 18:41





              @xiaodai unix.stackexchange.com/a/26059/24354

              – Hartley Brody
              Oct 20 '15 at 18:41













              Want to provide an example of that for this to be a complete answer?

              – Henry F
              Feb 28 '17 at 4:01





              Want to provide an example of that for this to be a complete answer?

              – Henry F
              Feb 28 '17 at 4:01













              5














              /usr/sbin/useradd username -g groupname -d homedirectory





              share|improve this answer

























              • Its giving me error -bash: /usr/sbin/useradd: No such file or directory

                – Nishad Up
                Feb 20 '18 at 7:51















              5














              /usr/sbin/useradd username -g groupname -d homedirectory





              share|improve this answer

























              • Its giving me error -bash: /usr/sbin/useradd: No such file or directory

                – Nishad Up
                Feb 20 '18 at 7:51













              5












              5








              5







              /usr/sbin/useradd username -g groupname -d homedirectory





              share|improve this answer















              /usr/sbin/useradd username -g groupname -d homedirectory






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Aug 20 '15 at 12:13









              don_crissti

              51.7k15141168




              51.7k15141168










              answered Aug 20 '15 at 11:26









              user60679user60679

              14513




              14513












              • Its giving me error -bash: /usr/sbin/useradd: No such file or directory

                – Nishad Up
                Feb 20 '18 at 7:51

















              • Its giving me error -bash: /usr/sbin/useradd: No such file or directory

                – Nishad Up
                Feb 20 '18 at 7:51
















              Its giving me error -bash: /usr/sbin/useradd: No such file or directory

              – Nishad Up
              Feb 20 '18 at 7:51





              Its giving me error -bash: /usr/sbin/useradd: No such file or directory

              – Nishad Up
              Feb 20 '18 at 7:51











              3














              I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):



              yum install shadow-utils





              share|improve this answer



























                3














                I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):



                yum install shadow-utils





                share|improve this answer

























                  3












                  3








                  3







                  I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):



                  yum install shadow-utils





                  share|improve this answer













                  I know the OP answer was solved, however for those who are running CentOS from within the docker container, which appears to be missing both adduser and useradd, the solution is to install shadow-utils (under root obviously):



                  yum install shadow-utils






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 16 '18 at 4:38









                  verminvermin

                  311




                  311





















                      -2














                      whereis useradd


                      this is used to solve that problem






                      share|improve this answer





























                        -2














                        whereis useradd


                        this is used to solve that problem






                        share|improve this answer



























                          -2












                          -2








                          -2







                          whereis useradd


                          this is used to solve that problem






                          share|improve this answer















                          whereis useradd


                          this is used to solve that problem







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Dec 11 '14 at 12:30









                          Hauke Laging

                          57.5k1287136




                          57.5k1287136










                          answered Dec 11 '14 at 11:18









                          Admin linuxAdmin linux

                          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.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f148105%2fbash-adduser-command-not-found-on-centos%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?

                              Displaying single band from multi-band raster using QGIS

                              How many registers does an x86_64 CPU actually have?