Suddenly not authorized to mount anything.

If none of the more specific forums is the right place to ask

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 14:00

Do you believe I am being the victim of some kind of malware or something? By the way, I was surprised that Debian 10 doesn't install Clamav by default. Does it mean Buster has another way of dealing with viruses?
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby Chrisdb » 2020-01-22 14:28

luiznetto wrote:Do you believe I am being the victim of some kind of malware or something? By the way, I was surprised that Debian 10 doesn't install Clamav by default. Does it mean Buster has another way of dealing with viruses?


That's why we recommend using the repos from Debian :D
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 14:56

By the way, I removed (what I think are) the offending entries from /etc/apt/sources.list. It looks like this now:
Code: Select all
#

# deb cdrom:[Official Debian GNU/Linux Live 10.0.0 lxde 2019-07-06T11:17]/ buster main

#deb cdrom:[Official Debian GNU/Linux Live 10.0.0 lxde 2019-07-06T11:17]/ buster main

deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster-updates main

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 15:22

After this, I did
Code: Select all
Password:
root@debian:/home/luiz# apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease   
Get:4 https://www.deb-multimedia.org buster InRelease [19.5 kB]
Err:4 https://www.deb-multimedia.org buster InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
Reading package lists... Done
W: GPG error: https://www.deb-multimedia.org buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
E: The repository 'https://www.deb-multimedia.org buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

What does it mean
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117

and
W: GPG error: https://www.deb-multimedia.org buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby Chrisdb » 2020-01-22 16:22

Apt is still using your old repos

Do you have files under:
Code: Select all
/etc/apt/sources.list.d/
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 16:41

Yes, I do have one: multimedia.list
Code: Select all
deb https://www.deb-multimedia.org buster main non-free

It looks like I will have to reinstall anyway (the life of a Linux user is hard!) :(
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby Chrisdb » 2020-01-22 17:25

luiznetto wrote:Yes, I do have one: multimedia.list
Code: Select all
deb https://www.deb-multimedia.org buster main non-free

It looks like I will have to reinstall anyway (the life of a Linux user is hard!) :(


Just remove the file and run apt update again
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 17:47

I did that.
Code: Select all
luiz@debian:/etc/apt/sources.list.d$ su
Password:
root@debian:/etc/apt/sources.list.d# ls
multimedia.list
root@debian:/etc/apt/sources.list.d# rm multimedia.list
root@debian:/etc/apt/sources.list.d# ls
root@debian:/etc/apt/sources.list.d# apt-get update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Reading package lists... Done

Do I really have to reinstall the whole system? Other than that pesky message
Not authorized to perform operation (polkit authority not available and caller is not uid 0)

everything else seems to be working fine (except for the fan problem that I haven't so far been able to solve), and I can work around this by mounting the volumes manually.

What do you think?
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby Chrisdb » 2020-01-22 19:41

That's of course up to you. If you can live with this issue, you do not need to reinstall your system.

One last thing you can try:
Create the following file:
/etc/polkit-1/rules.d/00-mount-internal.rules

With the following content:
Code: Select all
polkit.addRule(function(action, subject) {
   if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" &&
      subject.local && subject.active && subject.isInGroup("storage")))
      {
         return polkit.Result.YES;
      }
});


**EDIT
Forgot to mention:
And add your user to storage group:
Code: Select all
usermod -aG storage <username>
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-22 21:02

I created the file that you mentioned, but look:
Code: Select all
root@debian:/etc/polkit-1/rules.d# /sbin/usermod -aG storage luiz
usermod: group 'storage' does not exist

Maybe "mount" is the real name of the group?
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby Head_on_a_Stick » 2020-01-22 21:14

luiznetto wrote:
Code: Select all
usermod: group 'storage' does not exist

It is possible to create new groups with groupadd(8) but it might be better to change the configuration file to use the extant plugdev group instead.
User avatar
Head_on_a_Stick
 
Posts: 11204
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Suddenly not authorized to mount anything.

Postby Chrisdb » 2020-01-23 06:30

Head_on_a_Stick wrote:
luiznetto wrote: but it might be better to change the configuration file to use the extant plugdev group instead.


Indeed this would be better :D

@luiznetto,
Do not forget to alter the content of file '/etc/polkit-1/rules.d/00-mount-internal.rules' to resemble your group:
Code: Select all
...
subject.local && subject.active && subject.isInGroup("plugdev")))
...
Chrisdb
 
Posts: 253
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

Postby luiznetto » 2020-01-25 17:46

Thank you guys, you've been excellent! I've tested it for two days, apparently it works. I think we can mark this thread as solved. :D
luiznetto
 
Posts: 66
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

Postby sunrat » 2020-01-25 23:46

Head_on_a_Stick wrote:
luiznetto wrote:
Code: Select all
usermod: group 'storage' does not exist

It is possible to create new groups with groupadd(8) but it might be better to change the configuration file to use the extant plugdev group instead.


plugdev is supposed to be for removable devices. From https://wiki.debian.org/SystemGroups :
plugdev: Allows members to mount (only with the options nodev and nosuid, for security reasons) and umount removable devices through pmount.
But I guess if it works...

Personally I have created "storage" group and added my user to it. Polkit rule works fine and I can mount local drives without extra authorization.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2962
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Previous

Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable