Sudo in terminal

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











up vote
-4
down vote

favorite












Is there any reason when I use sudo in a terminal, even if I know the password is correct, it is not accepted and I get instead some sort of "troll" reply?



When I use "su root", it works perfectly. So it looks something is wrong with sudo here.



I do know for a fact (for having read about it) that a glitch in sudo enabling malicous attacks discovered several months ago which is supposed to have actually been there for many years and which affects all sudo versions between 16 and 20. The version installed here (Porteus 3.2.2 86-64 which is based on Slackware and uses its repositories) is 20p2, and when I am looking for updates, there are none for sudo.



Could this problem be linked with that glitch?







share|improve this question






















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    Feb 12 at 10:19














up vote
-4
down vote

favorite












Is there any reason when I use sudo in a terminal, even if I know the password is correct, it is not accepted and I get instead some sort of "troll" reply?



When I use "su root", it works perfectly. So it looks something is wrong with sudo here.



I do know for a fact (for having read about it) that a glitch in sudo enabling malicous attacks discovered several months ago which is supposed to have actually been there for many years and which affects all sudo versions between 16 and 20. The version installed here (Porteus 3.2.2 86-64 which is based on Slackware and uses its repositories) is 20p2, and when I am looking for updates, there are none for sudo.



Could this problem be linked with that glitch?







share|improve this question






















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    Feb 12 at 10:19












up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











Is there any reason when I use sudo in a terminal, even if I know the password is correct, it is not accepted and I get instead some sort of "troll" reply?



When I use "su root", it works perfectly. So it looks something is wrong with sudo here.



I do know for a fact (for having read about it) that a glitch in sudo enabling malicous attacks discovered several months ago which is supposed to have actually been there for many years and which affects all sudo versions between 16 and 20. The version installed here (Porteus 3.2.2 86-64 which is based on Slackware and uses its repositories) is 20p2, and when I am looking for updates, there are none for sudo.



Could this problem be linked with that glitch?







share|improve this question














Is there any reason when I use sudo in a terminal, even if I know the password is correct, it is not accepted and I get instead some sort of "troll" reply?



When I use "su root", it works perfectly. So it looks something is wrong with sudo here.



I do know for a fact (for having read about it) that a glitch in sudo enabling malicous attacks discovered several months ago which is supposed to have actually been there for many years and which affects all sudo versions between 16 and 20. The version installed here (Porteus 3.2.2 86-64 which is based on Slackware and uses its repositories) is 20p2, and when I am looking for updates, there are none for sudo.



Could this problem be linked with that glitch?









share|improve this question













share|improve this question




share|improve this question








edited Feb 9 at 18:01

























asked Feb 9 at 17:56









Obiwan Kenoobi

12




12











  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    Feb 12 at 10:19
















  • Comments are not for extended discussion; this conversation has been moved to chat.
    – terdon♦
    Feb 12 at 10:19















Comments are not for extended discussion; this conversation has been moved to chat.
– terdon♦
Feb 12 at 10:19




Comments are not for extended discussion; this conversation has been moved to chat.
– terdon♦
Feb 12 at 10:19










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I'll try and clear up some of the things that I think are confusing you.




  1. sudo.



    This command, "super user do", allows users who are listed in /etc/sudoers to run commands as root (as the "super user") using their own passwords. This is usually configured by adding a group to /etc/sudoers and all members of that group will have the right to use sudo. If you look at your /etc/sudoers file, you should see something like:



    %wheel ALL=(ALL) ALL


    This means "allow all members of the group wheel to run commands with sudo". Many systems use the group sudo instead, but it's the same idea:



    %sudo ALL=(ALL:ALL) ALL


    If your user is a member of the relevant group, you will be able to run commands with sudo, by authenticating yourself as your normal user. So sudo uses your regular user's password.




  2. su



    This command lets you login as a different user ("switch user" but yes, also known as "super user" since it is commonly used to switch to root). To do so, you will be asked for the password of the user you want to log in as. So when you run su root, you will be prompted for the root password and not for your own user's password.




  3. "Insults"



    This is a silly little option in sudo that tells t to insult user who give wrong passwords. From man sudoers:



     insults If set, sudo will insult users when they enter an
    incorrect password. This flag is off by default.


    This is just for fun. If your system is giving you flak when you enter the wrong password, you have a line like this in /etc/sudoers:



    Defaults insults


    To remove this "feature", run sudo visudo and delete that line.



To sum up, you have configured two passwords on your system, one for each of two users. Your normal user, let's call him "ben", has one password (let's say "obiwan"), and the root user has another (let's say "kenobi"). When you run sudo command, you need to authenticate as "ben", so you need to enter obiwan as the password. When you run su or su root (same thing), you need to authenticate as root, so you need to enter kenobi as the password.




Very important: if you want to make any changes to /etc/sudoers, do so using visudo. Never edit this file directly. visudo will check the syntax for you and will stop you from making a change that breaks it. If you edit it directly and make a mistake, it can be really hard to fix. Note that visudo runs vi by default, so if you are not familiar with that rather special editor, use this command instead:



sudo EDITOR=/sbin/nano visudo





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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f423097%2fsudo-in-terminal%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I'll try and clear up some of the things that I think are confusing you.




    1. sudo.



      This command, "super user do", allows users who are listed in /etc/sudoers to run commands as root (as the "super user") using their own passwords. This is usually configured by adding a group to /etc/sudoers and all members of that group will have the right to use sudo. If you look at your /etc/sudoers file, you should see something like:



      %wheel ALL=(ALL) ALL


      This means "allow all members of the group wheel to run commands with sudo". Many systems use the group sudo instead, but it's the same idea:



      %sudo ALL=(ALL:ALL) ALL


      If your user is a member of the relevant group, you will be able to run commands with sudo, by authenticating yourself as your normal user. So sudo uses your regular user's password.




    2. su



      This command lets you login as a different user ("switch user" but yes, also known as "super user" since it is commonly used to switch to root). To do so, you will be asked for the password of the user you want to log in as. So when you run su root, you will be prompted for the root password and not for your own user's password.




    3. "Insults"



      This is a silly little option in sudo that tells t to insult user who give wrong passwords. From man sudoers:



       insults If set, sudo will insult users when they enter an
      incorrect password. This flag is off by default.


      This is just for fun. If your system is giving you flak when you enter the wrong password, you have a line like this in /etc/sudoers:



      Defaults insults


      To remove this "feature", run sudo visudo and delete that line.



    To sum up, you have configured two passwords on your system, one for each of two users. Your normal user, let's call him "ben", has one password (let's say "obiwan"), and the root user has another (let's say "kenobi"). When you run sudo command, you need to authenticate as "ben", so you need to enter obiwan as the password. When you run su or su root (same thing), you need to authenticate as root, so you need to enter kenobi as the password.




    Very important: if you want to make any changes to /etc/sudoers, do so using visudo. Never edit this file directly. visudo will check the syntax for you and will stop you from making a change that breaks it. If you edit it directly and make a mistake, it can be really hard to fix. Note that visudo runs vi by default, so if you are not familiar with that rather special editor, use this command instead:



    sudo EDITOR=/sbin/nano visudo





    share|improve this answer
























      up vote
      0
      down vote













      I'll try and clear up some of the things that I think are confusing you.




      1. sudo.



        This command, "super user do", allows users who are listed in /etc/sudoers to run commands as root (as the "super user") using their own passwords. This is usually configured by adding a group to /etc/sudoers and all members of that group will have the right to use sudo. If you look at your /etc/sudoers file, you should see something like:



        %wheel ALL=(ALL) ALL


        This means "allow all members of the group wheel to run commands with sudo". Many systems use the group sudo instead, but it's the same idea:



        %sudo ALL=(ALL:ALL) ALL


        If your user is a member of the relevant group, you will be able to run commands with sudo, by authenticating yourself as your normal user. So sudo uses your regular user's password.




      2. su



        This command lets you login as a different user ("switch user" but yes, also known as "super user" since it is commonly used to switch to root). To do so, you will be asked for the password of the user you want to log in as. So when you run su root, you will be prompted for the root password and not for your own user's password.




      3. "Insults"



        This is a silly little option in sudo that tells t to insult user who give wrong passwords. From man sudoers:



         insults If set, sudo will insult users when they enter an
        incorrect password. This flag is off by default.


        This is just for fun. If your system is giving you flak when you enter the wrong password, you have a line like this in /etc/sudoers:



        Defaults insults


        To remove this "feature", run sudo visudo and delete that line.



      To sum up, you have configured two passwords on your system, one for each of two users. Your normal user, let's call him "ben", has one password (let's say "obiwan"), and the root user has another (let's say "kenobi"). When you run sudo command, you need to authenticate as "ben", so you need to enter obiwan as the password. When you run su or su root (same thing), you need to authenticate as root, so you need to enter kenobi as the password.




      Very important: if you want to make any changes to /etc/sudoers, do so using visudo. Never edit this file directly. visudo will check the syntax for you and will stop you from making a change that breaks it. If you edit it directly and make a mistake, it can be really hard to fix. Note that visudo runs vi by default, so if you are not familiar with that rather special editor, use this command instead:



      sudo EDITOR=/sbin/nano visudo





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        I'll try and clear up some of the things that I think are confusing you.




        1. sudo.



          This command, "super user do", allows users who are listed in /etc/sudoers to run commands as root (as the "super user") using their own passwords. This is usually configured by adding a group to /etc/sudoers and all members of that group will have the right to use sudo. If you look at your /etc/sudoers file, you should see something like:



          %wheel ALL=(ALL) ALL


          This means "allow all members of the group wheel to run commands with sudo". Many systems use the group sudo instead, but it's the same idea:



          %sudo ALL=(ALL:ALL) ALL


          If your user is a member of the relevant group, you will be able to run commands with sudo, by authenticating yourself as your normal user. So sudo uses your regular user's password.




        2. su



          This command lets you login as a different user ("switch user" but yes, also known as "super user" since it is commonly used to switch to root). To do so, you will be asked for the password of the user you want to log in as. So when you run su root, you will be prompted for the root password and not for your own user's password.




        3. "Insults"



          This is a silly little option in sudo that tells t to insult user who give wrong passwords. From man sudoers:



           insults If set, sudo will insult users when they enter an
          incorrect password. This flag is off by default.


          This is just for fun. If your system is giving you flak when you enter the wrong password, you have a line like this in /etc/sudoers:



          Defaults insults


          To remove this "feature", run sudo visudo and delete that line.



        To sum up, you have configured two passwords on your system, one for each of two users. Your normal user, let's call him "ben", has one password (let's say "obiwan"), and the root user has another (let's say "kenobi"). When you run sudo command, you need to authenticate as "ben", so you need to enter obiwan as the password. When you run su or su root (same thing), you need to authenticate as root, so you need to enter kenobi as the password.




        Very important: if you want to make any changes to /etc/sudoers, do so using visudo. Never edit this file directly. visudo will check the syntax for you and will stop you from making a change that breaks it. If you edit it directly and make a mistake, it can be really hard to fix. Note that visudo runs vi by default, so if you are not familiar with that rather special editor, use this command instead:



        sudo EDITOR=/sbin/nano visudo





        share|improve this answer












        I'll try and clear up some of the things that I think are confusing you.




        1. sudo.



          This command, "super user do", allows users who are listed in /etc/sudoers to run commands as root (as the "super user") using their own passwords. This is usually configured by adding a group to /etc/sudoers and all members of that group will have the right to use sudo. If you look at your /etc/sudoers file, you should see something like:



          %wheel ALL=(ALL) ALL


          This means "allow all members of the group wheel to run commands with sudo". Many systems use the group sudo instead, but it's the same idea:



          %sudo ALL=(ALL:ALL) ALL


          If your user is a member of the relevant group, you will be able to run commands with sudo, by authenticating yourself as your normal user. So sudo uses your regular user's password.




        2. su



          This command lets you login as a different user ("switch user" but yes, also known as "super user" since it is commonly used to switch to root). To do so, you will be asked for the password of the user you want to log in as. So when you run su root, you will be prompted for the root password and not for your own user's password.




        3. "Insults"



          This is a silly little option in sudo that tells t to insult user who give wrong passwords. From man sudoers:



           insults If set, sudo will insult users when they enter an
          incorrect password. This flag is off by default.


          This is just for fun. If your system is giving you flak when you enter the wrong password, you have a line like this in /etc/sudoers:



          Defaults insults


          To remove this "feature", run sudo visudo and delete that line.



        To sum up, you have configured two passwords on your system, one for each of two users. Your normal user, let's call him "ben", has one password (let's say "obiwan"), and the root user has another (let's say "kenobi"). When you run sudo command, you need to authenticate as "ben", so you need to enter obiwan as the password. When you run su or su root (same thing), you need to authenticate as root, so you need to enter kenobi as the password.




        Very important: if you want to make any changes to /etc/sudoers, do so using visudo. Never edit this file directly. visudo will check the syntax for you and will stop you from making a change that breaks it. If you edit it directly and make a mistake, it can be really hard to fix. Note that visudo runs vi by default, so if you are not familiar with that rather special editor, use this command instead:



        sudo EDITOR=/sbin/nano visudo






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 12 at 10:16









        terdon♦

        122k28230403




        122k28230403






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f423097%2fsudo-in-terminal%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)