Adjust settings to avoid password prompts during automatic updates.
Adjust settings to avoid password prompts during automatic updates.
I'm using Debian 13 KDE in a living room environment. It stays quiet for the user and needs no interaction for upkeep. I configured automatic daily updates after shutdowns. It functions perfectly, refreshing every few days during startup or power-off. The process only adds a short delay to normal boot/shutdown timing. This is significantly better than Windows, where updates often take minutes and require a reboot. BUT: occasionally an update asks for a password. I can't identify the pattern of which updates need it. This bothers me, though it won't bother the rest of the family. How can I guarantee that no password is ever requested outside of logging in? I've considered these options, but none appeal to me: - enable monthly automatic updates and handle the password once a month: still inconvenient as updates take more than a few seconds. - switch to manual updates: ensures only I manage the password, but I'd rather avoid thinking about it. And if an update is available, the warning will appear. Is there a way to eliminate the password requirement for all updates completely?
It relates to the sudoer file in /etc/sudoers. This setup allows commands like apt update and upgrade without a password. You can use sudo with just a command, but it's better to install the required package first. For details on sudo on Arch Linux, check the official documentation here: https://wiki.archlinux.org/title/Sudo
Modify the "sudoers" configuration file located at "/etc". Or, create a file in "/etc/sudoers.d" with the proposed line. Admin rights are necessary for this task. You might also install the "unattended-upgrades" package, which automatically performs daily upgrades via a cron job, typically overnight. It operates as a privileged process without user interaction or passwords. For scheduling adjustments, run: sudo systemctl edit apt-daily-upgrade.timer to access an editor for custom overrides. The default settings are documented in comments and can help you understand the required syntax. Finally, refresh systemd's configuration using: sudo systemctl daemon-reload
Your username is ready. You can attempt "sudo apt update" in a fresh terminal window. If it functions properly, no password prompt should appear. A new session is essential because successful authentication with "sudo" lets you execute commands temporarily without re-entering credentials.
You entered your username and executed the command in the terminal. It didn't prompt for a password, which suggests the process completed successfully. Many users discuss updating with `apt update` via the terminal, but you only rely on `discover` for updates, assuming automatic settings cover what's listed. When you run the command manually, are any additional files or packages refreshed?
Yes it worked. Well yes discover is basically using apt. And there's nothing wrong for using discover because I'm using both really. And now on updates it won't ask for password anymore except if it's using different command which i doubt it does. Unless you're also using flatpak or snap. We can fix that if it's needed. Well if there were updates then at the end of the executed command it would tell you that there are upgradable packages available. If you do then we usually use command sudo apt upgrade to update the packages we have currently installed.
IIRC Discover employs "PackageKit," a toolkit that connects to multiple package managers via a uniform interface. This ensures the software remains compatible across different distributions, though in practice it tends to mirror APT updates on systems using APT. Discover also supports Flatpak and Snapd, meaning updates appear in Discover without triggering an "apt update." For Flatpak, use the command: flatpak update. It usually needs no special permissions for user-installed apps. Globally installed Flatpak items can be accessed with "sudo" or by adding "--system," which prompts a password when needed. The "unattended-upgrades" feature is limited to APT-based updates, so proceed carefully if you want to test it.
Occasionally it might request a password, similar to desktop dependencies on various Flatpaks—I think that’s a bug.