Skip to Content

How do I get rid of authentication required pop up ubuntu?


The “authentication required” pop-up in Ubuntu can be frustrating, especially when it keeps appearing and preventing you from properly using your system. This pop-up usually appears when Ubuntu requires elevated permissions to perform certain system tasks, but the good news is there are a few ways to get rid of it for good. In this comprehensive guide, we’ll walk through the common causes of the authentication pop-up and the various solutions you can try to disable it.

Common Causes of the Authentication Pop-up

Here are some of the most common triggers for the authentication pop-up in Ubuntu:

Installing or Updating Software

Whenever you use apt in the terminal or Ubuntu Software to install new programs or update existing ones, Ubuntu will prompt you to enter your password to confirm the changes. This is because installing/updating software requires elevated privileges.

System Updates

Ubuntu regularly checks for system updates in the background. If there are updates available, it will prompt you to authenticate before proceeding to install them. This ensures you are aware of the changes before they happen.

Hardware Changes

If you plug in a new external drive or other USB device, Ubuntu may bring up the authentication pop-up to confirm the new hardware can be accessed by your system. This is a security measure.

Accessing Admin Folders/Files

Trying to access certain protected folders like /root or system files will require authentication. This prevents accidental/unauthorized changes.

Running Admin Commands

Using sudo in the terminal or gksudo/pkexec in the GUI to run commands with admin privileges will first bring up the authentication prompt. This verifies you have permissions.

Changing System Settings

Making changes to certain system settings through System Settings or tweak tools will prompt for authentication beforehand as a precaution.

So in summary, the authentication pop-up appears whenever you try to perform an action that requires elevated permissions. But if it’s becoming annoying, there are ways to disable or bypass it.

Solutions to Get Rid of the Authentication Pop-Up

Here are the recommended solutions to stop the authentication prompt from bothering you constantly:

1. Increase Authentication Timeout

One easy solution is to increase the timeout period before you have to re-enter your password. By default, Ubuntu caches your authentication for around 5 minutes.

To extend this:

  • Open the “Passwords and Keys” settings
  • Click the “Password” tab
  • Under Login Options, adjust the “Lock account after” timeout
  • Try increasing to 15 minutes or more

This way, once you enter your password once, you likely won’t see the pop-up again for that period of time.

2. Disable Automatic Updates

Since background system updates often trigger the pop-up, disabling automatic updates can help:

  • Open Software & Updates
  • Go to the Updates tab
  • Set “Automatically check for updates” to “Never”
  • Click Apply

Now Ubuntu won’t prompt you about new updates until you manually check. Just remember to check periodically!

3. Unlock with Your Login Password

You can set Ubuntu to use your user account password anytime authentication is required rather than prompting you to enter a separate sudo password.

To do this, open the terminal and run:

sudo visudo

And add this line under the “User privilege specification” section:

%sudo ALL=(ALL) NOPASSWD:ALL

Save and close the file. Now your login password will work for sudo.

4. Disable Password for Specific Commands

If the pop-up appears consistently when running certain commands, you can disable the password requirement just for those commands.

For example, to allow the apt command to run without authentication:

sudo visudo

And add:

YOUR_USER_NAME ALL=(ALL) NOPASSWD: /usr/bin/apt

Replace YOUR_USER_NAME with your actual username.

You can do this for any other commands that don’t need password protection.

5. Use PolicyKit to Create No-Password Rules

For a more advanced option, you can use PolicyKit to define or override authentication rules for specific applications or actions.

For example, to make GNOME Tweaks stop requiring a password:

  • Create a .pkla file in /var/lib/polkit-1/localauthority/50-local.d/, like /usr/share/polkit-1/actions/org.gnome.tweaks.policy
  • Add this content:
    [Disable polkit gnome tweaks]
    Identity=unix-group:sudo
    Action=org.gnome.tweaks.modify
    ResultAny=no
    ResultInactive=no
    ResultActive=yes
    
  • This will allow anyone in the sudo group to modify settings in Tweaks without authentication.

Look at existing .pkla files for examples of creating other policies.

6. Temporarily Disable PolKit

You can completely disable PolicyKit to get rid of all authentication prompts. This is risky though and not recommended!

To do it anyway, run:

sudo service polkit stop

PolKit will be disabled until you restart it with:

 
sudo service polkit start

Again, this is not really recommended since it removes all privilege enforcement while stopped.

When You Still Need Authentication

Disabling the authentication pop-up comes with reduced security, so don’t overdo it. Here are some cases where you’ll still want to keep authentication enabled:

  • Running commands that can damage your system like rm
  • Making significant system modifications through reboot, services, kernels, etc.
  • Accessing extremely sensitive data
  • When using your Ubuntu machine on untrusted networks
  • If there are multiple user accounts on your system

So fully disabling authentication is only recommended for single user machines that you completely control and trust. Otherwise, use the selective solutions above to reduce specific pop-ups.

Conclusion

The Ubuntu authentication prompt serves an important security purpose, but it can get annoying if overused. Tweaking your password timeout, disabling automatic updates, configuring sudo rules, and using PolicyKit are good ways to reduce the pop-ups without fully compromising your system security.

Just remember to still authenticate for sensitive operations like system changes, data access, risky commands, and multi-user machines. With the right balance, you can gain convenience without excessive exposure. Hopefully this guide gives you some helpful options to eliminate those pesky authentication pop-ups!