1

I'm looking to turn off all password authentication prompts for a specific user (let's say Steve) on my Ubuntu 21.04 machine.

I added the line steve ALL=(ALL) NOPASSWD: ALL using sudo visudo and that removed the need to authenticate Steve's password when using sudo commands. However, I still get password authentication prompts when using GUI applications such as Ubuntu Software.

Is there a way to turn these prompts off just for Steve? I still want the other accounts to receive the prompts.

Dan
  • 145
  • 1
  • 2
  • 12
  • 1
    Possibly something like this: [How do I prevent PolicyKit from asking for a password?](https://askubuntu.com/questions/98006/how-do-i-prevent-policykit-from-asking-for-a-password). You'd probably want `Identity=unix-user:steve` rather than `Identity=unix-group:admin`. Disclaimer - I haven't tried it. – steeldriver Aug 05 '21 at 11:54
  • @steeldriver That worked perfectly thanks for the help. Do you want to leave it as an answer so I can mark the question as closed? – Dan Aug 06 '21 at 06:36
  • 1
    Feel free to add your own answer since you've actually verified it - I was guessing about the details – steeldriver Aug 06 '21 at 11:49

1 Answers1

0

Thanks to steeldriver's comment and user55572's answer for this answer.


Replace steve with your own user name.

  1. Open a terminal.

  2. Run sudo usermod -aG sudo steve

  3. Run sudo gedit /var/lib/polkit-1/localauthority/50-local.d/disable-passwords.pkla

  4. Add

    [Do anything you want]
    Identity=unix-user:steve
    Action=*
    ResultActive=yes
    
  5. Save the file and close

Dan
  • 145
  • 1
  • 2
  • 12