linuxmint / mintupdate

The Linux Mint Update Manager
309 stars 152 forks source link

Allow security updates without sudo password #838

Closed mixmastamyk closed 10 months ago

mixmastamyk commented 10 months ago

The update mechanism requires sudo likely because apt requires it.

However that means everyday users need to have a sudo privileges just to get security updates. That shouldn't be the case. Everyone should have access to the latest security patches without undue work.

I recently found out about this daemon/command at askubuntu to run updates without sudo:

https://askubuntu.com/a/391992/116108

Software Updates uses aptdaemon to do all the work. 
You can do that from the command line using aptdcon:

Check for updates:

    aptdcon --refresh

Install updates:

    aptdcon --safe-upgrade

Would be great if the mint updater supported it.

mtwebster commented 10 months ago

Non-admin users shouldn't be able to update the system. It's still an update and updates can break things. Entering their password isn't undue work for admins.

That aptdcon command doesn't just install security updates - If you were going to do this you may as well enable automatic updates (Edit->Preferences->Automation).

mixmastamyk commented 10 months ago

I tend to disagree. Bear with me for a moment. Take for example a kid on a laptop.

Updates are not that a big deal:

Online security:

Also, traditional ideas about the division between admins and users (and focus on stability above all else) are now kinda old-fashioned when every user has multiple cheap computers, and live/restore disks are ubiquitous.

So arguably, I think the risk from delayed online security updates is an order of magnitude higher than a bad update risk.

There really should be some option or group I could put the user into, but it doesn't seem to be a thing. This GUI could alleviate that and provide the option of using aptdcon. The fact that it exists shows someone at Debian thought the idea worthwhile.

Cheers,

carlosmintfan commented 10 months ago

Wow, aptdcon can do APT operations without sudo? Is that because a daemon always runs in the background as root and the application can use it? Can a use disable that manually? EDIT: Found out, /var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.packagekit.pkla

carlosmintfan commented 10 months ago

Ah, but you need to enter a password of an admin if you aren't an admin, okay ;)