1

I am new to Linux systems, so please bear with me.

I wanted to remove the need to enter my password when using sudo and logging into the computer, so I changed the sudoers.d directory using sudo visudo and adding NOPASSWD:ALL to root, admin, and sudo.

Then I deleted my username password using sudo passwd -d username. (replacing username with actual username)

However, now that I do not have a password associated with my username, I am now unable to install software through Ubuntu Software because it asks for authentication, even when I have no password associated with my username.

I tried to turn off this feature using a solution from a 9-year-old post on this forum, but after changing auth_admin and auth_admin_keep to yes under the org.debian.apt.install-or-remove-packages part of /usr/share/polkit-1/actions/org.debian.apt.policy, nothing has changed. Ubuntu Software still asks for authentication...

  • what happens if you launch gnome-software via terminal with sudo? – dsSTORM Apr 25 '19 at 7:48
  • @dsSTORM sudo gnome-software seems to fix the issue of needing to "authenticate" myself before being able to install software, but it also introduces new abnormal behavior. For one, it take a lot longer to start up gnome-software (maybe that is normal, but it is the difference between <1 second and 1 minute). Oddly enough it also hides the apps in the "popular list," (e.g. Editor's Picks and Recommended Games). Also, clicking "show details" will open a new window rather than showing gnome-software in the same window. Some applications are also missing (e.g. Android Studio, Discord, etc.) – John Smith Apr 25 '19 at 8:15
  • I definitely didn't expect those side effects. I don't know how to fix those, sorry. – dsSTORM Apr 25 '19 at 9:03
0

It seemsorg.debian.apt.policy is not relevant for the Ubuntu Software Center anymore. In the same directory (/usr/share/polkit-1/actions/ ) you'll find the file io.snapcraft.snapd.policy, which is relevant for snap packages. In the file find the line:

<action id="io.snapcraft.snapd.manage">

under that line change

<allow_active>auth_admin_keep</allow_active>

to

<allow_active>yes</allow_active>.

Another file in the same directory you'll need to edit is org.freedesktop.packagekit.policy in order to install packages via apt. In this file you'll find the following "action ids":

<action id="org.freedesktop.packagekit.cancel-foreign"> <action id="org.freedesktop.packagekit.package-install"> <action id="org.freedesktop.packagekit.package-install-untrusted"> <action id="org.freedesktop.packagekit.package-reinstall"> <action id="org.freedesktop.packagekit.package-downgrade"> <action id="org.freedesktop.packagekit.system-trust-signing-key"> <action id="org.freedesktop.packagekit.package-eula-accept"> <action id="org.freedesktop.packagekit.package-remove"> <action id="org.freedesktop.packagekit.system-update"> <action id="org.freedesktop.packagekit.system-sources-configure"> <action id="org.freedesktop.packagekit.system-sources-refresh"> <action id="org.freedesktop.packagekit.system-network-proxy-configure"> <action id="org.freedesktop.packagekit.device-rebind"> <action id="org.freedesktop.packagekit.upgrade-system"> <action id="org.freedesktop.packagekit.repair-system"> <action id="org.freedesktop.packagekit.trigger-offline-update"> <action id="org.freedesktop.packagekit.trigger-offline-upgrade"> <action id="org.freedesktop.packagekit.clear-offline-update">

Underneath the associated description and message tags change the line:

<allow_active>auth_admin_keep</allow_active> or <allow_active>auth_admin</allow_active>

to

<allow_active>yes</allow_active>

After these changes you'll be able to use the Ubuntu Software Center without authenticating. You might have to reboot first.

However it is not recommended to use Ubuntu without sudo authentication.

Kind regards, Jeroen.

| improve this answer | |
  • Thank you for your response! It seems like changing the line in io.snapcraft.snapd.policy worked fine without having to change anything in org.freedesktop.packagekit.policy. The computer in question is a shared home machine, and would prefer if there were no password required for family members to use it as well. – John Smith Apr 28 '19 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.