Sudo complains “is not in the sudoers file”

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











up vote
1
down vote

favorite












I try to install Chrome and Skype on Debian. Data about my laptop



When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error.
What am I doing wrong?




ravenous is not in the sudoers file. This incident will be reported.




Wrong password in terminal?










share|improve this question



















  • 5




    Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
    – Gilles
    Jul 12 '15 at 13:15














up vote
1
down vote

favorite












I try to install Chrome and Skype on Debian. Data about my laptop



When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error.
What am I doing wrong?




ravenous is not in the sudoers file. This incident will be reported.




Wrong password in terminal?










share|improve this question



















  • 5




    Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
    – Gilles
    Jul 12 '15 at 13:15












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I try to install Chrome and Skype on Debian. Data about my laptop



When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error.
What am I doing wrong?




ravenous is not in the sudoers file. This incident will be reported.




Wrong password in terminal?










share|improve this question















I try to install Chrome and Skype on Debian. Data about my laptop



When I'm trying to install from the terminal, or log in as administrator, even when I type the correct password, every time I receive a error.
What am I doing wrong?




ravenous is not in the sudoers file. This incident will be reported.




Wrong password in terminal?







sudo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 12 '15 at 13:13









Gilles

519k12410351565




519k12410351565










asked Jul 12 '15 at 10:30









Mihai Szabo

1212




1212







  • 5




    Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
    – Gilles
    Jul 12 '15 at 13:15












  • 5




    Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
    – Gilles
    Jul 12 '15 at 13:15







5




5




Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
– Gilles
Jul 12 '15 at 13:15




Please do not post screenshots of text. Copy-paste the text. Screenshots are hard to read and cannot be searched.
– Gilles
Jul 12 '15 at 13:15










5 Answers
5






active

oldest

votes

















up vote
5
down vote













Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.



See man page for sudo for more detail.






share|improve this answer
















  • 4




    Use visudo to edit the file.
    – deltab
    Jul 12 '15 at 18:23

















up vote
2
down vote













There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)



If you set a root password during installation, then you can use su to run commands as root, for example



su -c 'dpkg -i google-chrome*deb'


If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:



su -c 'addgroup ravenous sudo'


You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.






share|improve this answer



























    up vote
    1
    down vote













    Log into root with the su command.
    check your users groups with the command "groups ravenous" (note groups)



    edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)



    if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.



    Uncomment:
    if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag.
    press esc and type :wq! to write and quit.



    Now, you add your user to the group:
    usermod -a -G wheel ravenous (add ravenous to group wheel)
    Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.






    share|improve this answer
















    • 9




      Don't edit /etc/sudoers directly! Run the command visudo.
      – Gilles
      Jul 12 '15 at 13:14










    • Indeed, better to use visudo.
      – Philip Wiberg
      Jul 13 '15 at 13:28

















    up vote
    0
    down vote













    Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:



    usermod -aG sudo ravenous


    A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.






    share|improve this answer




















    • It wouldn't work if the logged-in user just typed newgrp sudo?
      – Jeff Schaller
      Jul 12 '15 at 15:36










    • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
      – dakka
      Jul 13 '15 at 0:09

















    up vote
    0
    down vote














    How to add user to the list of sudo users.




    (Debian 9 Stretch)



    First. From terminal, type: visudo



    Find:



    # User privilege specification
    root ALL=(ALL:ALL) ALL


    Directly underneath these lines, add your user name:



    # User privilege specification
    root ALL=(ALL:ALL) ALL
    newName ALL=(ALL:ALL) ALL


    Exit visudo:



    ctrl + x



    Save changes to file:



    Y



    Enter.



    Reboot.



    New terminal:



    $ sudo apt-get update


    At prompt, type password



    Finished. You should now be using a 'regular' account user with sudo privileges.






    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',
      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%2f215391%2fsudo-complains-is-not-in-the-sudoers-file%23new-answer', 'question_page');

      );

      Post as a guest






























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      5
      down vote













      Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.



      See man page for sudo for more detail.






      share|improve this answer
















      • 4




        Use visudo to edit the file.
        – deltab
        Jul 12 '15 at 18:23














      up vote
      5
      down vote













      Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.



      See man page for sudo for more detail.






      share|improve this answer
















      • 4




        Use visudo to edit the file.
        – deltab
        Jul 12 '15 at 18:23












      up vote
      5
      down vote










      up vote
      5
      down vote









      Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.



      See man page for sudo for more detail.






      share|improve this answer












      Add an entry into /etc/sudoers to permit user ravenous to run dpkg as root.



      See man page for sudo for more detail.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Jul 12 '15 at 10:47









      steve

      13.6k22452




      13.6k22452







      • 4




        Use visudo to edit the file.
        – deltab
        Jul 12 '15 at 18:23












      • 4




        Use visudo to edit the file.
        – deltab
        Jul 12 '15 at 18:23







      4




      4




      Use visudo to edit the file.
      – deltab
      Jul 12 '15 at 18:23




      Use visudo to edit the file.
      – deltab
      Jul 12 '15 at 18:23












      up vote
      2
      down vote













      There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)



      If you set a root password during installation, then you can use su to run commands as root, for example



      su -c 'dpkg -i google-chrome*deb'


      If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:



      su -c 'addgroup ravenous sudo'


      You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.






      share|improve this answer
























        up vote
        2
        down vote













        There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)



        If you set a root password during installation, then you can use su to run commands as root, for example



        su -c 'dpkg -i google-chrome*deb'


        If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:



        su -c 'addgroup ravenous sudo'


        You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.






        share|improve this answer






















          up vote
          2
          down vote










          up vote
          2
          down vote









          There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)



          If you set a root password during installation, then you can use su to run commands as root, for example



          su -c 'dpkg -i google-chrome*deb'


          If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:



          su -c 'addgroup ravenous sudo'


          You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.






          share|improve this answer












          There are two common ways to execute commands as the administrator: with su or with sudo. The su command requires the root password, and can be used by any user who knows the root password. The sudo command asks for your own password, and can only be used by users who have been authorized by the administrator. (Both commands can be configured differently, I'm describing the default configuration.)



          If you set a root password during installation, then you can use su to run commands as root, for example



          su -c 'dpkg -i google-chrome*deb'


          If you want to use sudo, you'll first need to your account to the list of users allowed to use it. Under Debian, all users in the group called sudo can run any command as any user via the sudo command. So add your account to the sudo group:



          su -c 'addgroup ravenous sudo'


          You can do that through the GUI (in the “Users” settings tool) if you prefer. Group assignments take effect when you log in, so you'll need to log out and back in.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 12 '15 at 20:48









          Gilles

          519k12410351565




          519k12410351565




















              up vote
              1
              down vote













              Log into root with the su command.
              check your users groups with the command "groups ravenous" (note groups)



              edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)



              if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.



              Uncomment:
              if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag.
              press esc and type :wq! to write and quit.



              Now, you add your user to the group:
              usermod -a -G wheel ravenous (add ravenous to group wheel)
              Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.






              share|improve this answer
















              • 9




                Don't edit /etc/sudoers directly! Run the command visudo.
                – Gilles
                Jul 12 '15 at 13:14










              • Indeed, better to use visudo.
                – Philip Wiberg
                Jul 13 '15 at 13:28














              up vote
              1
              down vote













              Log into root with the su command.
              check your users groups with the command "groups ravenous" (note groups)



              edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)



              if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.



              Uncomment:
              if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag.
              press esc and type :wq! to write and quit.



              Now, you add your user to the group:
              usermod -a -G wheel ravenous (add ravenous to group wheel)
              Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.






              share|improve this answer
















              • 9




                Don't edit /etc/sudoers directly! Run the command visudo.
                – Gilles
                Jul 12 '15 at 13:14










              • Indeed, better to use visudo.
                – Philip Wiberg
                Jul 13 '15 at 13:28












              up vote
              1
              down vote










              up vote
              1
              down vote









              Log into root with the su command.
              check your users groups with the command "groups ravenous" (note groups)



              edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)



              if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.



              Uncomment:
              if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag.
              press esc and type :wq! to write and quit.



              Now, you add your user to the group:
              usermod -a -G wheel ravenous (add ravenous to group wheel)
              Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.






              share|improve this answer












              Log into root with the su command.
              check your users groups with the command "groups ravenous" (note groups)



              edit /etc/sudoers with, for example nano or vi "vi /etc/sudoers" scroll down to the part where you see groups that are uncommented (no # in front) and see if you are in that group (which your obviously are not)



              if any group is allowed you need to add your user to the group. if you cant see any uncommented groups, you need to uncomment a group.



              Uncomment:
              if using vi, press i for insert, move with keypads to the # in front of the group you need to uncomment, remove the hashtag.
              press esc and type :wq! to write and quit.



              Now, you add your user to the group:
              usermod -a -G wheel ravenous (add ravenous to group wheel)
              Log out as root, log out as ravenous, log back in. Or reboot if u'd like that.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 12 '15 at 11:19









              Philip Wiberg

              8115




              8115







              • 9




                Don't edit /etc/sudoers directly! Run the command visudo.
                – Gilles
                Jul 12 '15 at 13:14










              • Indeed, better to use visudo.
                – Philip Wiberg
                Jul 13 '15 at 13:28












              • 9




                Don't edit /etc/sudoers directly! Run the command visudo.
                – Gilles
                Jul 12 '15 at 13:14










              • Indeed, better to use visudo.
                – Philip Wiberg
                Jul 13 '15 at 13:28







              9




              9




              Don't edit /etc/sudoers directly! Run the command visudo.
              – Gilles
              Jul 12 '15 at 13:14




              Don't edit /etc/sudoers directly! Run the command visudo.
              – Gilles
              Jul 12 '15 at 13:14












              Indeed, better to use visudo.
              – Philip Wiberg
              Jul 13 '15 at 13:28




              Indeed, better to use visudo.
              – Philip Wiberg
              Jul 13 '15 at 13:28










              up vote
              0
              down vote













              Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:



              usermod -aG sudo ravenous


              A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.






              share|improve this answer




















              • It wouldn't work if the logged-in user just typed newgrp sudo?
                – Jeff Schaller
                Jul 12 '15 at 15:36










              • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
                – dakka
                Jul 13 '15 at 0:09














              up vote
              0
              down vote













              Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:



              usermod -aG sudo ravenous


              A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.






              share|improve this answer




















              • It wouldn't work if the logged-in user just typed newgrp sudo?
                – Jeff Schaller
                Jul 12 '15 at 15:36










              • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
                – dakka
                Jul 13 '15 at 0:09












              up vote
              0
              down vote










              up vote
              0
              down vote









              Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:



              usermod -aG sudo ravenous


              A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.






              share|improve this answer












              Or simply add ravenous to the sudo group. Login as root or use su. Then to add the user to the sudo group use this:



              usermod -aG sudo ravenous


              A default install of the sudo package on most Linux systems already have the group sudo setup for access (I know debian does as thats what I use myself), so simply adding any username to that group will grant access to use sudo. Also you will need to relogin for the change to take affect.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Jul 12 '15 at 12:09









              dakka

              616411




              616411











              • It wouldn't work if the logged-in user just typed newgrp sudo?
                – Jeff Schaller
                Jul 12 '15 at 15:36










              • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
                – dakka
                Jul 13 '15 at 0:09
















              • It wouldn't work if the logged-in user just typed newgrp sudo?
                – Jeff Schaller
                Jul 12 '15 at 15:36










              • hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
                – dakka
                Jul 13 '15 at 0:09















              It wouldn't work if the logged-in user just typed newgrp sudo?
              – Jeff Schaller
              Jul 12 '15 at 15:36




              It wouldn't work if the logged-in user just typed newgrp sudo?
              – Jeff Schaller
              Jul 12 '15 at 15:36












              hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
              – dakka
              Jul 13 '15 at 0:09




              hmm, good question, I am unsure whether that will make the new sudo group your default, or just add it as another group your belong to. Reading the man for this seems to indicate that would work though.
              – dakka
              Jul 13 '15 at 0:09










              up vote
              0
              down vote














              How to add user to the list of sudo users.




              (Debian 9 Stretch)



              First. From terminal, type: visudo



              Find:



              # User privilege specification
              root ALL=(ALL:ALL) ALL


              Directly underneath these lines, add your user name:



              # User privilege specification
              root ALL=(ALL:ALL) ALL
              newName ALL=(ALL:ALL) ALL


              Exit visudo:



              ctrl + x



              Save changes to file:



              Y



              Enter.



              Reboot.



              New terminal:



              $ sudo apt-get update


              At prompt, type password



              Finished. You should now be using a 'regular' account user with sudo privileges.






              share|improve this answer


























                up vote
                0
                down vote














                How to add user to the list of sudo users.




                (Debian 9 Stretch)



                First. From terminal, type: visudo



                Find:



                # User privilege specification
                root ALL=(ALL:ALL) ALL


                Directly underneath these lines, add your user name:



                # User privilege specification
                root ALL=(ALL:ALL) ALL
                newName ALL=(ALL:ALL) ALL


                Exit visudo:



                ctrl + x



                Save changes to file:



                Y



                Enter.



                Reboot.



                New terminal:



                $ sudo apt-get update


                At prompt, type password



                Finished. You should now be using a 'regular' account user with sudo privileges.






                share|improve this answer
























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote










                  How to add user to the list of sudo users.




                  (Debian 9 Stretch)



                  First. From terminal, type: visudo



                  Find:



                  # User privilege specification
                  root ALL=(ALL:ALL) ALL


                  Directly underneath these lines, add your user name:



                  # User privilege specification
                  root ALL=(ALL:ALL) ALL
                  newName ALL=(ALL:ALL) ALL


                  Exit visudo:



                  ctrl + x



                  Save changes to file:



                  Y



                  Enter.



                  Reboot.



                  New terminal:



                  $ sudo apt-get update


                  At prompt, type password



                  Finished. You should now be using a 'regular' account user with sudo privileges.






                  share|improve this answer















                  How to add user to the list of sudo users.




                  (Debian 9 Stretch)



                  First. From terminal, type: visudo



                  Find:



                  # User privilege specification
                  root ALL=(ALL:ALL) ALL


                  Directly underneath these lines, add your user name:



                  # User privilege specification
                  root ALL=(ALL:ALL) ALL
                  newName ALL=(ALL:ALL) ALL


                  Exit visudo:



                  ctrl + x



                  Save changes to file:



                  Y



                  Enter.



                  Reboot.



                  New terminal:



                  $ sudo apt-get update


                  At prompt, type password



                  Finished. You should now be using a 'regular' account user with sudo privileges.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 5 hours ago

























                  answered Aug 1 at 0:02









                  Kelly

                  114




                  114



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f215391%2fsudo-complains-is-not-in-the-sudoers-file%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?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?