Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Suddenly not authorized to mount anything.

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

#21 Post by luiznetto »

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!) :(

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

#22 Post by Chrisdb »

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

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

#23 Post by luiznetto »

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?

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

#24 Post by Chrisdb »

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>

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

#25 Post by luiznetto »

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?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Suddenly not authorized to mount anything.

#26 Post by Head_on_a_Stick »

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.
deadbang

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: Suddenly not authorized to mount anything.

#27 Post by Chrisdb »

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")))
...

luiznetto
Posts: 67
Joined: 2013-11-26 18:40

Re: Suddenly not authorized to mount anything.

#28 Post by luiznetto »

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

User avatar
sunrat
Administrator
Administrator
Posts: 6495
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 476 times

Re: Suddenly not authorized to mount anything.

#29 Post by sunrat »

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!

Post Reply