trying to add user to sudoers group gives me error











up vote
0
down vote

favorite












im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo, shows error <username> is not on the sudoers file. this incident will be reported.



Any suggestion what could it be? why that error if im trying to add.










share|improve this question









New contributor




Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • @PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
    – singrium
    Nov 23 at 17:10






  • 3




    @singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
    – PerlDuck
    Nov 23 at 17:12






  • 1




    That's a great idea to check the original text. I'll be doing the same too.
    – singrium
    Nov 23 at 17:14















up vote
0
down vote

favorite












im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo, shows error <username> is not on the sudoers file. this incident will be reported.



Any suggestion what could it be? why that error if im trying to add.










share|improve this question









New contributor




Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • @PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
    – singrium
    Nov 23 at 17:10






  • 3




    @singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
    – PerlDuck
    Nov 23 at 17:12






  • 1




    That's a great idea to check the original text. I'll be doing the same too.
    – singrium
    Nov 23 at 17:14













up vote
0
down vote

favorite









up vote
0
down vote

favorite











im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo, shows error <username> is not on the sudoers file. this incident will be reported.



Any suggestion what could it be? why that error if im trying to add.










share|improve this question









New contributor




Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











im adding one user to the sudoers file and when i enter the command sudo adduser <username> sudo, shows error <username> is not on the sudoers file. this incident will be reported.



Any suggestion what could it be? why that error if im trying to add.







adduser






share|improve this question









New contributor




Emanuel Rojas Agüero 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 question









New contributor




Emanuel Rojas Agüero 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 question




share|improve this question








edited Nov 23 at 17:06









PerlDuck

4,83111130




4,83111130






New contributor




Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 23 at 16:52









Emanuel Rojas Agüero

1




1




New contributor




Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Emanuel Rojas Agüero is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • @PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
    – singrium
    Nov 23 at 17:10






  • 3




    @singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
    – PerlDuck
    Nov 23 at 17:12






  • 1




    That's a great idea to check the original text. I'll be doing the same too.
    – singrium
    Nov 23 at 17:14


















  • @PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
    – singrium
    Nov 23 at 17:10






  • 3




    @singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
    – PerlDuck
    Nov 23 at 17:12






  • 1




    That's a great idea to check the original text. I'll be doing the same too.
    – singrium
    Nov 23 at 17:14
















@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10




@PerlDuck, sorry, I didn't notice it. Then I'll delete my comment. Thank you for notifying me. I already posted an answer, I hope it helps solving the problems
– singrium
Nov 23 at 17:10




3




3




@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
– PerlDuck
Nov 23 at 17:12




@singrium No worries. Sometimes when I see weird commands obviously missing something I just hit "edit" to check the original text for such <> parts.
– PerlDuck
Nov 23 at 17:12




1




1




That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14




That's a great idea to check the original text. I'll be doing the same too.
– singrium
Nov 23 at 17:14










2 Answers
2






active

oldest

votes

















up vote
3
down vote













You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):



richard@s15:~$ groups
richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$ sudo ls -l
[sudo] password for richard:
richard is not in the sudoers file. This incident will be reported.


Now, that same thing for me (notice that I am a member of the sudo group):



doug@s15:~$ groups
doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
doug@s15:~$ sudo ls -l
total 4112
drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
...


Furthermore, since I have the rights to do so, I can add richard to the sudo group:



doug@s15:~$ sudo adduser richard sudo
Adding user `richard' to group `sudo' ...
Adding user richard to group sudo
Done.


And for a subsequent login for richard:



richard@s15:~$ groups
richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
richard@s15:~$





share|improve this answer























  • True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
    – PerlDuck
    Nov 23 at 17:24








  • 1




    Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
    – Doug Smythies
    Nov 23 at 17:26




















up vote
0
down vote













Try to add the user to the sudoers file manually:




  • Go to home directory by running command cd

  • Then type sudo su


It will ask you to type your password to be in root user.




  • Run visudo


  • Then add this line to the end of the file (change username with your username:



    username        ALL=(ALL)      ALL


  • Save and exit



Credits:
Username is not in the sudoers file.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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
    });


    }
    });






    Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.










     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095439%2ftrying-to-add-user-to-sudoers-group-gives-me-error%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








    up vote
    3
    down vote













    You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):



    richard@s15:~$ groups
    richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$ sudo ls -l
    [sudo] password for richard:
    richard is not in the sudoers file. This incident will be reported.


    Now, that same thing for me (notice that I am a member of the sudo group):



    doug@s15:~$ groups
    doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    doug@s15:~$ sudo ls -l
    total 4112
    drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
    drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
    ...


    Furthermore, since I have the rights to do so, I can add richard to the sudo group:



    doug@s15:~$ sudo adduser richard sudo
    Adding user `richard' to group `sudo' ...
    Adding user richard to group sudo
    Done.


    And for a subsequent login for richard:



    richard@s15:~$ groups
    richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$





    share|improve this answer























    • True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
      – PerlDuck
      Nov 23 at 17:24








    • 1




      Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
      – Doug Smythies
      Nov 23 at 17:26

















    up vote
    3
    down vote













    You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):



    richard@s15:~$ groups
    richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$ sudo ls -l
    [sudo] password for richard:
    richard is not in the sudoers file. This incident will be reported.


    Now, that same thing for me (notice that I am a member of the sudo group):



    doug@s15:~$ groups
    doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    doug@s15:~$ sudo ls -l
    total 4112
    drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
    drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
    ...


    Furthermore, since I have the rights to do so, I can add richard to the sudo group:



    doug@s15:~$ sudo adduser richard sudo
    Adding user `richard' to group `sudo' ...
    Adding user richard to group sudo
    Done.


    And for a subsequent login for richard:



    richard@s15:~$ groups
    richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$





    share|improve this answer























    • True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
      – PerlDuck
      Nov 23 at 17:24








    • 1




      Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
      – Doug Smythies
      Nov 23 at 17:26















    up vote
    3
    down vote










    up vote
    3
    down vote









    You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):



    richard@s15:~$ groups
    richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$ sudo ls -l
    [sudo] password for richard:
    richard is not in the sudoers file. This incident will be reported.


    Now, that same thing for me (notice that I am a member of the sudo group):



    doug@s15:~$ groups
    doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    doug@s15:~$ sudo ls -l
    total 4112
    drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
    drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
    ...


    Furthermore, since I have the rights to do so, I can add richard to the sudo group:



    doug@s15:~$ sudo adduser richard sudo
    Adding user `richard' to group `sudo' ...
    Adding user richard to group sudo
    Done.


    And for a subsequent login for richard:



    richard@s15:~$ groups
    richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$





    share|improve this answer














    You are trying to use sudo , however you do not have the right to do so as you yourself are not a member of the sudo group. In such circumstances you will always get that error message when you attempt to use sudo for whatever reason. Example (notice that richard is not a member of sudo):



    richard@s15:~$ groups
    richard adm cdrom dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$ sudo ls -l
    [sudo] password for richard:
    richard is not in the sudoers file. This incident will be reported.


    Now, that same thing for me (notice that I am a member of the sudo group):



    doug@s15:~$ groups
    doug adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    doug@s15:~$ sudo ls -l
    total 4112
    drwxrwxr-x 2 doug doug 4096 Oct 25 16:37 audio
    drwxr-xr-x 39 doug doug 4096 Oct 14 2016 backup_carrie_01
    ...


    Furthermore, since I have the rights to do so, I can add richard to the sudo group:



    doug@s15:~$ sudo adduser richard sudo
    Adding user `richard' to group `sudo' ...
    Adding user richard to group sudo
    Done.


    And for a subsequent login for richard:



    richard@s15:~$ groups
    richard adm cdrom sudo dip plugdev lxd lpadmin sambashare libvirtd
    richard@s15:~$






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 23 at 17:24

























    answered Nov 23 at 17:16









    Doug Smythies

    7,02631428




    7,02631428












    • True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
      – PerlDuck
      Nov 23 at 17:24








    • 1




      Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
      – Doug Smythies
      Nov 23 at 17:26




















    • True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
      – PerlDuck
      Nov 23 at 17:24








    • 1




      Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
      – Doug Smythies
      Nov 23 at 17:26


















    True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
    – PerlDuck
    Nov 23 at 17:24






    True. But this suggests that the OP tried to add himself to the sudo group (without being member of it), doesn't it? We dont't know whether the two "instances" of <username> in his post refer to the same or different unames.
    – PerlDuck
    Nov 23 at 17:24






    1




    1




    Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
    – Doug Smythies
    Nov 23 at 17:26






    Yes. The adduser part is a red herring, in my opinion. That error message only appears when a non sudo user tries to use sudo, at least that I am aware of. That is why in my answer I used a trivial command.
    – Doug Smythies
    Nov 23 at 17:26














    up vote
    0
    down vote













    Try to add the user to the sudoers file manually:




    • Go to home directory by running command cd

    • Then type sudo su


    It will ask you to type your password to be in root user.




    • Run visudo


    • Then add this line to the end of the file (change username with your username:



      username        ALL=(ALL)      ALL


    • Save and exit



    Credits:
    Username is not in the sudoers file.






    share|improve this answer

























      up vote
      0
      down vote













      Try to add the user to the sudoers file manually:




      • Go to home directory by running command cd

      • Then type sudo su


      It will ask you to type your password to be in root user.




      • Run visudo


      • Then add this line to the end of the file (change username with your username:



        username        ALL=(ALL)      ALL


      • Save and exit



      Credits:
      Username is not in the sudoers file.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Try to add the user to the sudoers file manually:




        • Go to home directory by running command cd

        • Then type sudo su


        It will ask you to type your password to be in root user.




        • Run visudo


        • Then add this line to the end of the file (change username with your username:



          username        ALL=(ALL)      ALL


        • Save and exit



        Credits:
        Username is not in the sudoers file.






        share|improve this answer












        Try to add the user to the sudoers file manually:




        • Go to home directory by running command cd

        • Then type sudo su


        It will ask you to type your password to be in root user.




        • Run visudo


        • Then add this line to the end of the file (change username with your username:



          username        ALL=(ALL)      ALL


        • Save and exit



        Credits:
        Username is not in the sudoers file.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 23 at 17:07









        singrium

        796117




        796117






















            Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.













            Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.












            Emanuel Rojas Agüero is a new contributor. Be nice, and check out our Code of Conduct.















             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1095439%2ftrying-to-add-user-to-sudoers-group-gives-me-error%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 did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局