Results 1 to 5 of 5

Thread: Use sudo to install sudo?

  1. #1
    Join Date
    Jan 2007
    Location
    Cambridge, UK
    Beans
    44
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Use sudo to install sudo?

    Not a problem, but this amused me. Somehow sudo had been removed from my system.

    Code:
    sudo apt-get update
    The program 'sudo' can be found in the following packages:
     * sudo
     * sudo-ldap
    Try: sudo apt-get install <selected package>
    -bash: sudo: command not found
    A bit like 'keyboard not found, press any key to continue'

    John

  2. #2
    Join Date
    Jun 2008
    Location
    Romania
    Beans
    82
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Use sudo to install sudo?

    I don't know what to tell you, maybe a more experienced member will tell you what's with that.

    But you can use the su command to get sudo back.

  3. #3
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Use sudo to install sudo?

    No, you can't. "su" would require an active root account to work, as it asks for root user's password, not the current user's.


    But anyway, the solution is to boot into the recovery mode from Grub menu, which will get you into root shell. then just run "apt-get install sudo".

    (I must admit that this is a bit trickier situation to solve than the "keyboard not found"-error you mentioned. Which, actually, is perfectly logical when you know that the machine can't continue the boot process until the keyboard is attached..)
    Last edited by mcduck; August 14th, 2008 at 11:35 AM.

  4. #4
    Join Date
    Jun 2008
    Location
    Romania
    Beans
    82
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Use sudo to install sudo?

    Quote Originally Posted by mcduck View Post
    No, you can't. "su" would require an active root account to work, as it asks for root user's password, not the current user's.


    But anyway, the solution is to boot into the recovery mode from Grub menu, which will get you into root shell. then just run "apt-get install sudo".
    My bad, sorry mcduck.

  5. #5
    Join Date
    Jan 2007
    Location
    Cambridge, UK
    Beans
    44
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Use sudo to install sudo?

    Quote Originally Posted by mcduck View Post
    No, you can't. "su" would require an active root account to work, as it asks for root user's password, not the current user's.
    I had an active root account, so not a problem for me to fix
    But anyway, the solution is to boot into the recovery mode from Grub menu, which will get you into root shell. then just run "apt-get install sudo".
    Thnaks, useful to know if it happens again..

    John

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •