Results 1 to 4 of 4

Thread: How can I stop Ubuntu requiring my password?

  1. #1
    Join Date
    Aug 2016
    Beans
    8

    How can I stop Ubuntu requiring my password?

    I've been using Ubuntu for many years, and I fully understand why it asks for a password before doing anything important.
    I would never try to remove this feature under normal circumstances.

    This case is different though - I am building a retro gaming console based on Retropie.
    I'm using a pc and Ubuntu, because the Pi 3 doesn't have enough grunt to run an N64 emulator satisfactorily.

    Whenever I tell retropie to shut down the console, it kicks me out to a terminal and I have to connect a keyboard and type in my password.
    This is obviously far from ideal.

    I followed this guide to install Retropie:
    https://github.com/retropie/retropie...LTS-x86-Flavor

    And it addresses this very issue:

    It is not possible to restart/shutdown if an sudo requests an password. To disable sudo password request add the line $user ALL=(ALL) NOPASSWD:ALL at the end of /etc/sudoers. Replace $userwith the name of your current user.

    I tried this, and it doesn't seem to have worked.
    I also found another guide which suggested the same as above, but with $sudo instead of the username, but that didn't work either. I even tried it with both lines, but no luck.

    Any ideas as to why this might no be working?

  2. #2
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: How can I stop Ubuntu requiring my password?

    does it give any error?

    can you show us the sudores file? and let us knwo the user name?
    from Ask Ubutnu:
    1. First, if your user has sudo privileges, you must enable its NOPASSWD option. Otherwise, sudo will ask for a password even when you don't have one, and won't accept an empty password.
      To do so, open the sudoers configuration file with sudo visudo, and add the following line to the file, replacing david with your username:
      Code:
      david ALL=(ALL) NOPASSWD:ALL
      Close the editor to apply the changes, and test the effect on sudo in a new terminal.
    2. Delete the password for your user by running this command, replacing david with your username:
      Code:
      sudo passwd david -d
    Code:
    
    
    also see note if you use pkexec: http://askubuntu.com/questions/28107...ve-no-password


    also why do you need to "reconnect" after closing the console?
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Full disk backup (newer kernel -> suitable for newer PC): Clonezilla
    User friendly full disk backup: Rescuezilla

  3. #3
    Join Date
    Aug 2016
    Beans
    8

    Re: How can I stop Ubuntu requiring my password?

    I'm pretty sure I did exactly that (I tried a few things, but I'm pretty certain that was one of them).

    I am at work right now, but I'll check when I get home.

    What did you mean by why do I need to 'reconnect'?

    Retropie has a shutdown menu, which should enable me to just select shut down and have the pc shut down.
    Instead, when I select shut down, it closes retropie and brings me to the desktop with a terminal asking for my password. When I enter the password, the pc then shuts down as normal.

  4. #4
    Join Date
    Aug 2016
    Beans
    8

    Re: How can I stop Ubuntu requiring my password?

    I ended up just 'shotgunning' it - I set it to NOPASSWD for not just the one user, but for all the groups as well. Seems to have done the trick.

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
  •