Whenever I start the Synaptic package manager, it asks for a password. How do I make it skip that dialog?

I'm using Debian 9.8.

  • 1
  • @JdeBP Why? What are people supposed to use for package management? Only terminal? – Fabian Röling Apr 6 at 17:30
  • Also, this is technically not Synaptic specific, but that's the only program where I remember encountering that, so people will likely search for that. – Fabian Röling Apr 6 at 17:30
  • Where is the problem ? You don't start Synaptic package manager all 5 minutes ! – ctac_ Apr 6 at 18:24
  • @ctac_ You could for example have a really long password and don't want to enter it once on login and another time when starting Synaptic, mounting something or whatever. And even if that doesn't count for you, there's the simple argument that I am the owner of my computer and it should do what I say without asking for information it already has over and over. – Fabian Röling Apr 6 at 18:28

I originally thought that editing /usr/share/polkit-1/actions/com.ubuntu.pkexec.synaptic.policy would do it (see the old versions of this answer if you want to see that method), but I was told that that would get reset whenever Synaptic gets updated. You would also need to do it for every single program.

A better solution was given here: Create the file /etc/polkit-1/localauthority/50-local.d/99-nopassword.pkla (or any other file name, just the location and ending has to be the same) and fill it with:

[No password prompt]

I tried it in a Debian VM and it successfully skipped the prompt for Synaptic.

  • 3
    No, that's not the way to do this. Any edits to files in /usr/share will be lost when the package owning that file gets updated. The right way to set Polkit privileges is to create PKLA files in /etc/polkit-1, allowing your user the com.ubuntu.pkexec.synaptic.policy action with allow_active, etc. set to yes. You don't need to, and shouldn't, edit these XML files instead. See, e.g., askubuntu.com/a/614537/158442 – muru Apr 6 at 17:41
  • @muru You're right, that works and it's much quicker! (And yes, I did try it on a different system.) What do you suggest for this question? Should I delete the answer and flag the question as duplicate of that other question? Should I edit this question completely to change it to the other solution? Should I delete both? – Fabian Röling Apr 6 at 18:35
  • My example is from Ask Ubuntu, so this question can't be closed as a duplicate. You can edit this answer to correct it, however. – muru Apr 6 at 18:41

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.