User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

[Resolved (nearly)] PackageKit asks "root" password

Mon Sep 30, 2019 10:13 am

Hi
I'm newb to RPi. I meet PackageKit to ask the root password I don't know.
Please notice I secured my Pi changing username (as advised in Documentation).
I know I could manage softs with apt-get and/or installing synaptic.
This is to understand what I missed : would the new user be added to an additional group (yet it is in sudo group and has its own /etc/sudoers.d/ file)

Many thanks for help

[EDIT]: please also notice I can sudo anything from command line, and even sudo su
Last edited by SyncBerry on Tue Oct 01, 2019 6:04 pm, edited 2 times in total.

User avatar
DougieLawson
Posts: 36576
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PackageKit asks "root" password

Mon Sep 30, 2019 10:15 am

Use a sudo passwd command to set a strong root password.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: PackageKit asks "root" password

Mon Sep 30, 2019 10:19 am

Thank you Dougie
Is it the only way? I ask you this because I yet have locked down root login with sudo passwd -d -l root
Last edited by SyncBerry on Mon Sep 30, 2019 10:23 am, edited 2 times in total.

User avatar
DougieLawson
Posts: 36576
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PackageKit asks "root" password

Mon Sep 30, 2019 10:22 am

Without knowing what PackageKit is, or what it's doing or why it needs root access it's impossible to tell you.

So I've applied the KISS principle.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: PackageKit asks "root" password

Mon Sep 30, 2019 10:25 am

PackageKit is the GUI package manager in raspbian as I sayed above (synaptic/apt).
The droplist shows nothing but root, but its presence (I mean the droplist) let suppose it could be populated with designated users (maybe via a group membership).... OK, let me have a look to their web pages.... : no knowledge (for newbies) here.

[EDIT]: When I launch from Applications menu>Preferences>Add/Remove Software, then menu About shows PiPackage. Also I see in top U myuser terminal I'm running pi-packages. So these last 3 in bold may be aliases or forks for the PackageKit name I also found in the GUI (About).

bjtheone
Posts: 390
Joined: Mon May 20, 2019 11:28 pm
Location: The Frozen North (AKA Canada)

Re: PackageKit asks "root" password

Mon Sep 30, 2019 3:19 pm

PackageKit is indeed a package management GUI, it is however not Synaptic.

Perhaps it might be good to take a step back and inform us of what you are trying to do and what distro you have loaded. You did mention Raspbian, but not which version and Synaptic most certainly is not included by default in Buster, nor was it in Stretch. You could install it.

JumpZero
Posts: 1033
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: PackageKit asks "root" password

Mon Sep 30, 2019 4:21 pm

I confirm on a plain standard Raspbian Buster (where the default username has been changed from pi to something else) from the GUI Menu Add/Remove software the system ask for the root password. The drop down menu has only one option: root (May be if the username wasn't changed the choice "pi" would be possible...)
It has been reported here as well : https://www.raspberrypi.org/forums/view ... p?t=204674
Yes you can create a root password, but the normal way would be to use the user password who is a sudoer

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: PackageKit asks "root" password

Mon Sep 30, 2019 4:42 pm

bjtheone wrote:
Mon Sep 30, 2019 3:19 pm
...You did mention Raspbian...
Ho, so sorry: as a newb to RPi I dl'd raspbian_latest (the one released on 2019-07-10). The release notes are the same for raspbian_full_latest, we can see synaptic was never in raspbian any version. My aim is to do minimal changes to the defaults. I choosed not to install the full only to add minimum minimorum : this Pi4 box is for a friend that is newber than I am so I'd like to keep the distro a maximum OOTB so he can easily use it, eventually with the help of only reading this forum, because I'm afraid he won't know how to word it's own questions: he isn't techy at all.

User avatar
jojopi
Posts: 3086
Joined: Tue Oct 11, 2011 8:38 pm

Re: PackageKit asks "root" password

Mon Sep 30, 2019 5:18 pm

I suspect this is another symptom of the missing configuration file in Raspbian's policykit-1 package.

See https://www.raspberrypi.org/forums/view ... 8#p1488298.

JumpZero
Posts: 1033
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: PackageKit asks "root" password

Mon Sep 30, 2019 6:44 pm

jojopi wrote:
Mon Sep 30, 2019 5:18 pm
I suspect this is another symptom of the missing configuration file in Raspbian's policykit-1 package.

See https://www.raspberrypi.org/forums/view ... 8#p1488298.
Hi jojopi you pointed the right direction.
I created a file /etc/polkit-1/localauthority.conf.d/51-debian-sudo.conf saying:

Code: Select all

[Configuration]
AdminIdentities=unix-group:sudo
as in your linked post
But no effect, no change
But found this file /etc/polkit-1/localauthority.conf.d/60-desktop-policy.conf saying:

Code: Select all

[Configuration]
AdminIdentities=unix-user:pi;unix-user:0
Editing it and changing the word pi to my new username did it!
I now can add software from this menu.

I don't know if as you said it's a awful hack (adding unix-user:pi to 60-desktop-policy.conf) I believe you.
But I remember some years ago I had a similar problem with the sd-card copier I was unable to use it because of changing the default user from pi to my usual Linux username.

Thks anyway

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: PackageKit asks "root" password

Mon Sep 30, 2019 7:45 pm

+1 Works for me too.
[TODO] : update the documentation and main forum threads about change username. It was the main corner case I asked anyone to point.

Thanks a lot

User avatar
jojopi
Posts: 3086
Joined: Tue Oct 11, 2011 8:38 pm

Re: PackageKit asks "root" password

Mon Sep 30, 2019 8:30 pm

JumpZero wrote:
Mon Sep 30, 2019 6:44 pm
AdminIdentities=unix-group:sudo

But no effect, no change
Was your user actually in the sudo group, though? In standard Debian, that group is the easiest way to give an administrator with-password access to both sudo and pkexec. However, it is not the only way. There is nothing special about the group except that it is mentioned in the default sudoers and localauthority.conf.

Anyway, on your own machine there is no problem with referring to user names in configuration files. I just think it would be better in the distributed images to do it using the standard groups. Precisely to avoid the problem where merely using a different name causes unexpectedly different results.

User avatar
SyncBerry
Posts: 51
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: [Resolved (nearly)] PackageKit asks "root" password

Tue Oct 01, 2019 6:05 pm

[EDIT] : I tried to install gufw from Add /Remove Software: it failed. I had to do it from command line. Maybe an other corner case of changing username. Although, I succeeded to install baobab with this tool.

JumpZero
Posts: 1033
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: PackageKit asks "root" password

Tue Oct 01, 2019 6:17 pm

jojopi wrote:
Mon Sep 30, 2019 8:30 pm
Was your user actually in the sudo group, though?
Yes my user in the sudo group.
..
From my first Pi (the Pi1) I always change the default user to my username. The main reason is that it makes it easier with NFS shares (Yes I know you can map user,s, but it's pain..) And from the begining there is always some small unwanted side effects.

Return to “Troubleshooting”