Addgroup: command not found

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











up vote
1
down vote

favorite












I'm following this tutorial to setup a new sftp user on a webserver running on debian, but when I get to step 3



sudo addgroup filetransfer


I can't go on because the terminal gives me the following error



Addgroup: command not found


I installed the adduser package with apt-get install and the server says it's already installed. I also tried to use the command groupadd but nothing changes.
What am I doing wrong?
Thanks everyone!



EDIT: the result of sudo bash -c 'echo $PATH' as asked in the questions below



/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games









share|improve this question























  • What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
    – Lambert
    Apr 5 '17 at 11:57











  • Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
    – roaima
    Apr 5 '17 at 11:57











  • Also the result of running sudo grep -i secure_path /etc/sudoers
    – roaima
    Apr 5 '17 at 12:00











  • roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
    – Ada
    Apr 5 '17 at 12:05










  • Lambert, if I run it a second time it gives the same output: command not found.
    – Ada
    Apr 5 '17 at 12:05














up vote
1
down vote

favorite












I'm following this tutorial to setup a new sftp user on a webserver running on debian, but when I get to step 3



sudo addgroup filetransfer


I can't go on because the terminal gives me the following error



Addgroup: command not found


I installed the adduser package with apt-get install and the server says it's already installed. I also tried to use the command groupadd but nothing changes.
What am I doing wrong?
Thanks everyone!



EDIT: the result of sudo bash -c 'echo $PATH' as asked in the questions below



/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games









share|improve this question























  • What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
    – Lambert
    Apr 5 '17 at 11:57











  • Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
    – roaima
    Apr 5 '17 at 11:57











  • Also the result of running sudo grep -i secure_path /etc/sudoers
    – roaima
    Apr 5 '17 at 12:00











  • roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
    – Ada
    Apr 5 '17 at 12:05










  • Lambert, if I run it a second time it gives the same output: command not found.
    – Ada
    Apr 5 '17 at 12:05












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm following this tutorial to setup a new sftp user on a webserver running on debian, but when I get to step 3



sudo addgroup filetransfer


I can't go on because the terminal gives me the following error



Addgroup: command not found


I installed the adduser package with apt-get install and the server says it's already installed. I also tried to use the command groupadd but nothing changes.
What am I doing wrong?
Thanks everyone!



EDIT: the result of sudo bash -c 'echo $PATH' as asked in the questions below



/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games









share|improve this question















I'm following this tutorial to setup a new sftp user on a webserver running on debian, but when I get to step 3



sudo addgroup filetransfer


I can't go on because the terminal gives me the following error



Addgroup: command not found


I installed the adduser package with apt-get install and the server says it's already installed. I also tried to use the command groupadd but nothing changes.
What am I doing wrong?
Thanks everyone!



EDIT: the result of sudo bash -c 'echo $PATH' as asked in the questions below



/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games






sudo path






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 7 '17 at 21:57









Gilles

518k12410351564




518k12410351564










asked Apr 5 '17 at 11:49









Ada

814




814











  • What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
    – Lambert
    Apr 5 '17 at 11:57











  • Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
    – roaima
    Apr 5 '17 at 11:57











  • Also the result of running sudo grep -i secure_path /etc/sudoers
    – roaima
    Apr 5 '17 at 12:00











  • roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
    – Ada
    Apr 5 '17 at 12:05










  • Lambert, if I run it a second time it gives the same output: command not found.
    – Ada
    Apr 5 '17 at 12:05
















  • What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
    – Lambert
    Apr 5 '17 at 11:57











  • Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
    – roaima
    Apr 5 '17 at 11:57











  • Also the result of running sudo grep -i secure_path /etc/sudoers
    – roaima
    Apr 5 '17 at 12:00











  • roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
    – Ada
    Apr 5 '17 at 12:05










  • Lambert, if I run it a second time it gives the same output: command not found.
    – Ada
    Apr 5 '17 at 12:05















What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
– Lambert
Apr 5 '17 at 11:57





What happens when you try sudo groupadd filetransfer a second time? The groupadd utility does not provide verbose output, but does when the group already exists.
– Lambert
Apr 5 '17 at 11:57













Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
– roaima
Apr 5 '17 at 11:57





Please run the following command and include it and its result in your question. sudo bash -c 'echo $PATH'
– roaima
Apr 5 '17 at 11:57













Also the result of running sudo grep -i secure_path /etc/sudoers
– roaima
Apr 5 '17 at 12:00





Also the result of running sudo grep -i secure_path /etc/sudoers
– roaima
Apr 5 '17 at 12:00













roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
– Ada
Apr 5 '17 at 12:05




roaima, I added the result of the first command in the question, the second command didn't give any result. thanks!
– Ada
Apr 5 '17 at 12:05












Lambert, if I run it a second time it gives the same output: command not found.
– Ada
Apr 5 '17 at 12:05




Lambert, if I run it a second time it gives the same output: command not found.
– Ada
Apr 5 '17 at 12:05










2 Answers
2






active

oldest

votes

















up vote
5
down vote



accepted










It looks like your environment doesn't include the /usr/sbin directory that holds such system programs.



The quick fix should be to use /usr/sbin/adduser instead of just adduser.



Two alternative solutions are:




  1. Change the PATH in .bashrc and/or .bash_profile so that /usr/sbin is included in the list. For example, here is my setting:



    export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/games:/usr/games"



  2. Edit the sudoers configuration (with sudo visudo -f /etc/sudoers.d/securepath) and add this line to the empty file:



    # Extend the PATH for sudo commands
    Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


Either would be sufficient.






share|improve this answer




















  • @Ada which solution (of the three) did you use?
    – roaima
    Apr 5 '17 at 15:32

















up vote
0
down vote













It solely depends on OS to OS, you are using ubuntu OS, u need to use groupadd instead of addgroup






share|improve this answer








New contributor




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

















    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%2f356105%2faddgroup-command-not-found%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    5
    down vote



    accepted










    It looks like your environment doesn't include the /usr/sbin directory that holds such system programs.



    The quick fix should be to use /usr/sbin/adduser instead of just adduser.



    Two alternative solutions are:




    1. Change the PATH in .bashrc and/or .bash_profile so that /usr/sbin is included in the list. For example, here is my setting:



      export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/games:/usr/games"



    2. Edit the sudoers configuration (with sudo visudo -f /etc/sudoers.d/securepath) and add this line to the empty file:



      # Extend the PATH for sudo commands
      Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


    Either would be sufficient.






    share|improve this answer




















    • @Ada which solution (of the three) did you use?
      – roaima
      Apr 5 '17 at 15:32














    up vote
    5
    down vote



    accepted










    It looks like your environment doesn't include the /usr/sbin directory that holds such system programs.



    The quick fix should be to use /usr/sbin/adduser instead of just adduser.



    Two alternative solutions are:




    1. Change the PATH in .bashrc and/or .bash_profile so that /usr/sbin is included in the list. For example, here is my setting:



      export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/games:/usr/games"



    2. Edit the sudoers configuration (with sudo visudo -f /etc/sudoers.d/securepath) and add this line to the empty file:



      # Extend the PATH for sudo commands
      Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


    Either would be sufficient.






    share|improve this answer




















    • @Ada which solution (of the three) did you use?
      – roaima
      Apr 5 '17 at 15:32












    up vote
    5
    down vote



    accepted







    up vote
    5
    down vote



    accepted






    It looks like your environment doesn't include the /usr/sbin directory that holds such system programs.



    The quick fix should be to use /usr/sbin/adduser instead of just adduser.



    Two alternative solutions are:




    1. Change the PATH in .bashrc and/or .bash_profile so that /usr/sbin is included in the list. For example, here is my setting:



      export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/games:/usr/games"



    2. Edit the sudoers configuration (with sudo visudo -f /etc/sudoers.d/securepath) and add this line to the empty file:



      # Extend the PATH for sudo commands
      Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


    Either would be sufficient.






    share|improve this answer












    It looks like your environment doesn't include the /usr/sbin directory that holds such system programs.



    The quick fix should be to use /usr/sbin/adduser instead of just adduser.



    Two alternative solutions are:




    1. Change the PATH in .bashrc and/or .bash_profile so that /usr/sbin is included in the list. For example, here is my setting:



      export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin:/bin:/usr/local/games:/usr/games"



    2. Edit the sudoers configuration (with sudo visudo -f /etc/sudoers.d/securepath) and add this line to the empty file:



      # Extend the PATH for sudo commands
      Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"


    Either would be sufficient.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 5 '17 at 12:11









    roaima

    41.7k550114




    41.7k550114











    • @Ada which solution (of the three) did you use?
      – roaima
      Apr 5 '17 at 15:32
















    • @Ada which solution (of the three) did you use?
      – roaima
      Apr 5 '17 at 15:32















    @Ada which solution (of the three) did you use?
    – roaima
    Apr 5 '17 at 15:32




    @Ada which solution (of the three) did you use?
    – roaima
    Apr 5 '17 at 15:32












    up vote
    0
    down vote













    It solely depends on OS to OS, you are using ubuntu OS, u need to use groupadd instead of addgroup






    share|improve this answer








    New contributor




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





















      up vote
      0
      down vote













      It solely depends on OS to OS, you are using ubuntu OS, u need to use groupadd instead of addgroup






      share|improve this answer








      New contributor




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



















        up vote
        0
        down vote










        up vote
        0
        down vote









        It solely depends on OS to OS, you are using ubuntu OS, u need to use groupadd instead of addgroup






        share|improve this answer








        New contributor




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









        It solely depends on OS to OS, you are using ubuntu OS, u need to use groupadd instead of addgroup







        share|improve this answer








        New contributor




        Vinod Kumar 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




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









        answered 10 mins ago









        Vinod Kumar

        11




        11




        New contributor




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





        New contributor





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






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



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f356105%2faddgroup-command-not-found%23new-answer', 'question_page');

            );

            Post as a guest













































































            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