Bug 420640 - Discover does not allow user ID 1000 to install new packages anymore
Summary: Discover does not allow user ID 1000 to install new packages anymore
Status: RESOLVED DOWNSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.18.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-26 21:59 UTC by MMz
Modified: 2020-05-22 15:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Tentative to Remove one package; User ID 1000, UserName "brixiamate" (69.96 KB, image/jpeg)
2020-04-26 21:59 UTC, MMz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MMz 2020-04-26 21:59:18 UTC
Created attachment 127907 [details]
Tentative to Remove one package; User ID 1000, UserName "brixiamate"

SUMMARY
ID 1000 is the first user (Admin) from installation, named "brixiamate":
After creating a second Administrator user ID 1001, named "linusiano" none of the 2 Admins are allowed anymore to install new packages from Discover.

STEPS TO REPRODUCE
1. Create a second Administrator ID 1001, named "Linusiano", and give it rights as Member of the same main group named as "brixiamate, the ID 1000 first Admin
 
2. than  add "linusiano" to all the individual membership of "brixiamate" given by default during installation:
   adm (4)
   brixiamate (1001)   [this Group ID 1001 is somehow strange; should be 1000, but looks like impossible to change manually: abort error]
   cdrom (24)
   dip (30)
   lpadmin (119)
   plugdev (46)
   sambashare (1000)
   sudo (27)

3. Launch Discover from the menu

OBSERVED RESULT
Does not allow to complete the install procedure of new software or to uninstall present software.

Error message box = 
  "Not sufficient rights ..."
  "the PackageKit Daemon stops"


EXPECTED RESULT
Run to Install/Remove without stop.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version:
    Linux (x86_64) release 5.4.0-26-generic
    LUBUNTU 20.04 LTS x64 - LXQt desktop [fresh installation from official .iso with CheckSum verified before installation]

ADDITIONAL INFORMATION
On the contrary, by terminal each of the 2 Admins can run [$ sudo apt install package_name] and committ positively the same installation.

Please, help !
Thank you :-)
MMz
Comment 1 Nate Graham 2020-04-28 14:26:31 UTC
Can you use that user to install the package using `pkcon install <packagename>` on the command line?
Comment 2 Bug Janitor Service 2020-05-13 04:33:15 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 MMz 2020-05-14 22:19:08 UTC
Sorry to wait more trials.

The answer to your question is NO, that user (actually both "sudo" as UID=1000 and UID=1001) can not commit to install the package by simply using `pkcon install <packagename>` on the command line and entering its password at the next message prompt window. It fails Authentication.

Than, in order to commit the install, it has to start the command as sudo using
'sudo pkcon install <packagename>`.

See next copy of terminal screens for both command, in the same sequence, from UID=1000(brixiamate).

And than an abstract from /var/log/auth.log file in the same moments of session.

-.-.- without sudo
brixiamate@BAT20n12:~$ pkcon install leocad
Resolving                     [=========================]                    
Querying                      [=========================]                    
Testing changes               [=========================]                    
Finished                      [=========================]                    
Installing                    [=========================]                    
Waiting for authentication    [=========================]         li         
Finished                      [=========================]                    
Fatal error: Failed to obtain authentication.                                

-.- with sudo
brixiamate@BAT20n12:~$ sudo pkcon install leocad
[sudo] password di brixiamate: 
Resolving                     [=========================]         
Querying                      [=========================]         
Testing changes               [=========================]         
Finished                      [                         ] (0%)  
The following packages have to be installed:
 leocad-19.07.1-1build1.amd64   software CAD con mattoncini virtuali
Proceed with changes? [N/y] y

                              [=========================]         
Installing                    [=========================]         
Loading cache                 [=========================]         
Downloading packages          [=========================]         
Running                       [=========================]         
Finished                      [=========================]         
brixiamate@BAT20n12:~$ 


-.- abstract from /var/log/auth.log of the same 2 install operation.
.
.
.
May 14 23:54:15 BAT20n12 polkitd(authority=local): Registered Authentication Agent for unix-process:8718:1981959 (system bus name :1.156 [/usr/bin/pkttyagent --notify-fd 14 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8)
May 14 23:54:26 BAT20n12 PackageKit: uid 1000 is trying to obtain org.freedesktop.packagekit.package-install auth (only_trusted:1)
May 14 23:54:31 BAT20n12 polkitd(authority=local): Unregistered Authentication Agent for unix-session:9 (system bus name :1.135, object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8) (disconnected from bus)
May 14 23:54:31 BAT20n12 polkitd(authority=local): Operator of unix-session:9 FAILED to authenticate to gain authorization for action org.freedesktop.packagekit.package-install for system-bus-name::1.154 [pkcon install leocad] (owned by unix-user:brixiamate)
May 14 23:54:31 BAT20n12 PackageKit: uid 1000 failed to obtain auth
May 14 23:54:31 BAT20n12 polkitd(authority=local): Unregistered Authentication Agent for unix-process:8718:1981959 (system bus name :1.156, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8) (disconnected from bus)
May 14 23:54:32 BAT20n12 polkitd(authority=local): Registered Authentication Agent for unix-session:9 (system bus name :1.158 [/usr/bin/lxqt-policykit-agent], object path /org/lxqt/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8)
May 14 23:55:34 BAT20n12 sudo: pam_unix(sudo:auth): Couldn't open /etc/securetty: File o directory non esistente
May 14 23:55:37 BAT20n12 sudo: pam_unix(sudo:auth): Couldn't open /etc/securetty: File o directory non esistente
May 14 23:55:37 BAT20n12 sudo: brixiamate : TTY=pts/1 ; PWD=/home/brixiamate ; USER=root ; COMMAND=/usr/bin/pkcon install leocad
May 14 23:55:37 BAT20n12 sudo: pam_unix(sudo:session): session opened for user root by (uid=0)
May 14 23:55:37 BAT20n12 polkitd(authority=local): Registered Authentication Agent for unix-process:8826:1990248 (system bus name :1.160 [/usr/bin/pkttyagent --notify-fd 10 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8)
May 14 23:55:41 BAT20n12 PackageKit: uid 0 is trying to obtain org.freedesktop.packagekit.package-install auth (only_trusted:1)
May 14 23:55:41 BAT20n12 PackageKit: uid 0 obtained auth for org.freedesktop.packagekit.package-install
May 14 23:56:45 BAT20n12 polkitd(authority=local): Unregistered Authentication Agent for unix-process:8826:1990248 (system bus name :1.160, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale it_IT.UTF-8) (disconnected from bus)
May 14 23:56:45 BAT20n12 sudo: pam_unix(sudo:session): session closed for user root

-.-
Please, help !
Thank you :-)
MMz
Comment 4 MMz 2020-05-14 22:22:06 UTC
See above trial answers
Comment 5 Aleix Pol 2020-05-22 15:43:07 UTC
pkcon without sudo should work by showing you the polkit dialog to escalate privileges. This is something that PackageKit does and Discover relies on it to do it properly.

I suggest you contact your distribution as to why this mechanism isn't working properly.

A way to test polkit, would be to run "pkexec ls" and see if you get the password dialog as expected.