• Re: more problems with su and sudo

    From Titus Newswanger@21:1/5 to Titus Newswanger on Tue Jul 1 05:10:01 2025
    On 6/30/25 21:55, Titus Newswanger wrote:
    The time I accidentally locked myself out of sudo, I mounted the
    locked hdd on another linux pc and edited the shadow file, copying the
    hash for sudo with the known password to the drive with the unknown
    password. I would not recommend trying that unless you are confident
    about editing operating system configuration files.

    My mistake.

    There is no password for sudo. It was the password for the user.

    --
    Titus Newswanger
    Curtiss WI

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Titus Newswanger@21:1/5 to Maureen L Thomas on Tue Jul 1 05:00:01 2025
    This is a multi-part message in MIME format.
    On 6/30/25 20:58, Maureen L Thomas wrote:

    Ok guys, I finally had to reinstall Debian bookworm and lost all my passwords.  I did get a refund on the VPN but have spent the last
    three days changing all my passwords to get into the bills and pay
    them.  I went for PIA VPN and followed instructions to get me into the
    root area.

    Sorry, I have no experience with VPN.

    When I went to the terminal I first followed the directions which
    stated sudo.  I put in my new password and with no way to check it I
    hit enter.  Three times I did this and was very careful to put it in correctly.  It would not take it and kept saying not accepted.

    I've had that problem once or twice where a newly created password would
    not work. I've always suspected typos or undefined caps-lock state.

    Most password entry forms have a small icon to click then you can view
    the new password you entered. I always check that when installing Debian
    and anywhere else I need to create a password, just to confirm I didn't inadvertently have caps-lock or number-lock active.

    The terminal doesn't have that option, in that case if I want to be
    doubly sure I'm getting my new password correct, I open a text editor
    and type my new password then copy-and-paste it into the terminal
    window. Then when it asks for it the second time to confirm, I type
    directly into the terminal.

    The time I accidentally locked myself out of sudo, I mounted the locked
    hdd on another linux pc and edited the shadow file, copying the hash for
    sudo with the known password to the drive with the unknown password. I
    would not recommend trying that unless you are confident about editing operating system configuration files.

    So today I tried it again with just su and got the same results.

    I am at a complete loss.  If I can't get into the sudo file I cannot
    install anything in root.  I really need your knowledge.   I always
    double and sometimes triple check everything I do.  Passwords are
    written down and double checked especially the new ones I made.

    Thank you in advance.

    Moe

    --
    Titus Newswanger
    Curtiss WI

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 6/30/25 20:58, Maureen L Thomas
    wrote:<br>
    </div>
    <blockquote type="cite"
    cite="mid:6f4b96ef-3da5-4aac-848c-305504b203f9@verizon.net">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <p><font face="DejaVu Sans">Ok guys, I finally had to reinstall
    Debian bookworm and lost all my passwords.  I did get a refund
    on the VPN but have spent the last three days changing all my
    passwords to get into the bills and pay them.  I went for PIA
    VPN and followed instructions to get me into the root area.</font></p>
    </blockquote>
    <font face="DejaVu Sans">Sorry, I have no experience with VPN.</font><br>
    <blockquote type="cite"
    cite="mid:6f4b96ef-3da5-4aac-848c-305504b203f9@verizon.net">
    <p><font face="DejaVu Sans">When I went to the terminal I first
    followed the directions which stated sudo.  I put in my new
    password and with no way to check it I hit enter.  Three times
    I did this and was very careful to put it in correctly.  It
    would not take it and kept saying not accepted.</font></p>
    </blockquote>
    <p><font face="DejaVu Sans">I've had that problem once or twice
    where a newly created password would not work. I've always
    suspected typos or undefined caps-lock state.<br>
    </font></p>
    <p><font face="DejaVu Sans">Most password entry forms have a small
    icon to click then you can view the new password you entered. I
    always check that when installing Debian and anywhere else I
    need to create a password, just to confirm I didn't
    inadvertently have caps-lock or number-lock active.</font></p>
    <p><font face="DejaVu Sans">The terminal doesn't have that option,
    in that case if I want to be doubly sure I'm getting my new
    password correct, I open a text editor and type my new password
    then copy-and-paste it into the terminal window. Then when it
    asks for it the second time to confirm, I type directly into the
    terminal.</font></p>
    <p><font face="DejaVu Sans">The time I accidentally locked myself
    out of sudo, I mounted the locked hdd on another linux pc and
    edited the shadow file, copying the hash for sudo with the known
    password to the drive with the unknown password. I would not
    recommend trying that unless you are confident about editing
    operating system configuration files.<br>
    </font></p>
    <blockquote type="cite"
    cite="mid:6f4b96ef-3da5-4aac-848c-305504b203f9@verizon.net">
    <p><font face="DejaVu Sans">So today I tried it again with just su
    and got the same results.</font></p>
    <p><font face="DejaVu Sans">I am at a complete loss.  If I can't
    get into the sudo file I cannot install anything in root.  I
    really need your knowledge.   I always double and sometimes
    triple check everything I do.  Passwords are written down and
    double checked especially the new ones I made.</font></p>
    <p><font face="DejaVu Sans">Thank you in advance.</font></p>
    <p><font face="DejaVu Sans">Moe<br>
    </font></p>
    <lt-container></lt-container>
    </blockquote>
    <pre class="moz-signature" cols="72">--
    Titus Newswanger
    Curtiss WI</pre>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Maureen L Thomas on Tue Jul 1 06:40:01 2025
    On 6/30/25 18:58, Maureen L Thomas wrote:
    Ok guys, I finally had to reinstall Debian bookworm and lost all my passwords.  I did get a refund on the VPN but have spent the last three
    days changing all my passwords to get into the bills and pay them.  I
    went for PIA VPN and followed instructions to get me into the root area.

    When I went to the terminal I first followed the directions which stated sudo.  I put in my new password and with no way to check it I hit
    enter.  Three times I did this and was very careful to put it in correctly.  It would not take it and kept saying not accepted.

    So today I tried it again with just su and got the same results.

    I am at a complete loss.  If I can't get into the sudo file I cannot
    install anything in root.  I really need your knowledge.   I always
    double and sometimes triple check everything I do.  Passwords are
    written down and double checked especially the new ones I made.

    Thank you in advance.

    Moe


    Below, I have assumed that your normal user account name on your Debian computer is "moe". If I have guessed wrong, please use the correct
    normal user account name in the commands below.


    I assume you have downloaded the PIA VPN Linux software installer to
    your home directory:

    https://www.privateinternetaccess.com/download/linux-vpn

    pia-linux-3.6.1-08339.run


    I assume the following command is failing:

    $ sudo pia-linux-3.6.1-08339.run


    Looking at /etc/sudoers, I see a clue:

    # Allow members of group sudo to execute any command
    %sudo ALL=(ALL:ALL) ALL


    To add your normal user account to the group "sudo" manually:

    1. Open a terminal and substitute your login to the root account:

    $ su -

    Enter the root password when prompted.

    2. Verify that the terminal is now logged in as root:

    # whoami

    3. Add your account to the group "sudo":

    # usermod -a -G sudo moe

    4. Verify that your normal user account has been added:

    # grep sudo /etc/group

    5. Return the terminal login to your normal user account:

    # exit

    6. Close all windows/ apps and log out.


    The next time you log in, sudo(8) should work:

    $ sudo pia-linux-3.6.1-08339.run


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to David Christensen on Tue Jul 1 13:30:01 2025
    On Mon, Jun 30, 2025 at 21:36:14 -0700, David Christensen wrote:
    The next time you log in, sudo(8) should work:

    $ sudo pia-linux-3.6.1-08339.run

    Even if sudo works, that command won't. It would need to be something
    like:

    sudo chmod +x pia-linux-3.6.1-08339.run
    sudo ./pia-linux-3.6.1-08339.run

    However, your instructions still leave out one critical piece that I
    suspect Moe may be overlooking:

    * "su" uses the ROOT password.
    * "sudo" uses YOUR password.

    If she's trying to use the root password for sudo, that won't work
    (unless her password is the same as the root password, of course).

    It might also be worth mentioning that there may not BE a root password, depending on the choices that were made during the Debian installation.
    Some people skip the step where you're prompted to enter a root password,
    which means no root password is ever set, but sudo is installed and
    the initial user account is added to the sudo group.

    If that was the case for Moe, then she can add a root password by doing:

    sudo passwd root

    (after she gets sudo working, obviously).

    If neither "su" nor "sudo" can be made to work, then she'll have to
    follow the instructions for resetting her root password. I believe
    they've already been posted at least once in this thread. If not,
    it should be easy enough to find them. Do a web search.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Christensen@21:1/5 to Greg Wooledge on Tue Jul 1 18:00:01 2025
    On 7/1/25 04:25, Greg Wooledge wrote:
    On Mon, Jun 30, 2025 at 21:36:14 -0700, David Christensen wrote:
    The next time you log in, sudo(8) should work:

    $ sudo pia-linux-3.6.1-08339.run

    Even if sudo works, that command won't. It would need to be something
    like:

    sudo chmod +x pia-linux-3.6.1-08339.run
    sudo ./pia-linux-3.6.1-08339.run


    Thank you for the clarification.


    However, your instructions still leave out one critical piece that I
    suspect Moe may be overlooking:

    * "su" uses the ROOT password.
    * "sudo" uses YOUR password.


    Thank you for the clarification.


    Hopefully, Moe now has enough information to install the PIA VPN.


    David

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)