public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] mounting USB without root password
@ 2021-01-29 15:21 thelma
  2021-01-29 16:01 ` bobwxc
  0 siblings, 1 reply; 16+ messages in thread
From: thelma @ 2021-01-29 15:21 UTC (permalink / raw
  To: Gentoo mailing list

Can someone refresh my memory how to mount USB as user without entering root password.

I was about to mount it normally user (without root password) but after I reboot the PC (I did not upgrade) it keep asking me for root password.
Nothing was changed.  
So why all of a sudden system is asking me for root password when mounting USB?
I'm using xfce.






^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 15:21 [gentoo-user] mounting USB without root password thelma
@ 2021-01-29 16:01 ` bobwxc
  2021-01-29 16:34   ` thelma
  0 siblings, 1 reply; 16+ messages in thread
From: bobwxc @ 2021-01-29 16:01 UTC (permalink / raw
  To: gentoo-user


[-- Attachment #1.1: Type: text/plain, Size: 642 bytes --]

在 2021/1/29 下午11:21, thelma@sys-concept.com 写道:
> Can someone refresh my memory how to mount USB as user without entering root password.
>
> I was about to mount it normally user (without root password) but after I reboot the PC (I did not upgrade) it keep asking me for root password.
> Nothing was changed.
> So why all of a sudden system is asking me for root password when mounting USB?
> I'm using xfce.
>
Try *udisks2*, it can auto mount USB disks.

But the wiki seems out-of-date, may not helpfull
     https://wiki.gentoo.org/wiki/Udisks

-- 
bobwxc
F645 5C7A 08E8 A637 24C6  D59E 36E9 4EAB B53E 516B



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 16:01 ` bobwxc
@ 2021-01-29 16:34   ` thelma
  2021-01-29 16:47     ` Matt Connell (Gmail)
  2021-01-29 17:37     ` [gentoo-user] " Grant Edwards
  0 siblings, 2 replies; 16+ messages in thread
From: thelma @ 2021-01-29 16:34 UTC (permalink / raw
  To: gentoo-user

On 1/29/21 9:01 AM, bobwxc wrote:
> 在 2021/1/29 下午11:21, thelma@sys-concept.com 写道:
>> Can someone refresh my memory how to mount USB as user without entering root password.
>>
>> I was about to mount it normally user (without root password) but after I reboot the PC (I did not upgrade) it keep asking me for root password.
>> Nothing was changed.
>> So why all of a sudden system is asking me for root password when mounting USB?
>> I'm using xfce.
>>
> Try *udisks2*, it can auto mount USB disks.
> 
> But the wiki seems out-of-date, may not helpfull
>     https://wiki.gentoo.org/wiki/Udisks
> 
I uncommented in:  sudoers (it works)
%wheel ALL=(ALL) ALL
 %wheel ALL=(ALL) NOPASSWD: ALL


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 16:34   ` thelma
@ 2021-01-29 16:47     ` Matt Connell (Gmail)
  2021-01-29 16:58       ` Matt Connell (Gmail)
  2021-01-29 17:06       ` Michael
  2021-01-29 17:37     ` [gentoo-user] " Grant Edwards
  1 sibling, 2 replies; 16+ messages in thread
From: Matt Connell (Gmail) @ 2021-01-29 16:47 UTC (permalink / raw
  To: gentoo-user

On Fri, 2021-01-29 at 09:34 -0700, thelma@sys-concept.com wrote:
> I uncommented in:  sudoers (it works)
> %wheel ALL=(ALL) ALL
>  %wheel ALL=(ALL) NOPASSWD: ALL

This feels like fixing a loose screw with a sledgehammer.

This change allows any wheel group users to execute any command (via
sudo) without authenticating.  That is to say, the change is far more
broad than the originally stated issue you're trying to fix.  Do you
implicitly trust all wheel group users that much?

sysfs/udisks, as stated previously, is probably the correct tool for
the job.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 16:47     ` Matt Connell (Gmail)
@ 2021-01-29 16:58       ` Matt Connell (Gmail)
  2021-01-29 17:06       ` Michael
  1 sibling, 0 replies; 16+ messages in thread
From: Matt Connell (Gmail) @ 2021-01-29 16:58 UTC (permalink / raw
  To: gentoo-user

On Fri, 2021-01-29 at 10:47 -0600, Matt Connell (Gmail) wrote:
> sysfs/udisks

Typo on my part. This should be sys-fs/udisks




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 16:47     ` Matt Connell (Gmail)
  2021-01-29 16:58       ` Matt Connell (Gmail)
@ 2021-01-29 17:06       ` Michael
  2021-01-29 17:12         ` Matt Connell (Gmail)
  1 sibling, 1 reply; 16+ messages in thread
From: Michael @ 2021-01-29 17:06 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]

On Friday, 29 January 2021 16:47:51 GMT Matt Connell (Gmail) wrote:
> On Fri, 2021-01-29 at 09:34 -0700, thelma@sys-concept.com wrote:
> > I uncommented in:  sudoers (it works)
> > %wheel ALL=(ALL) ALL
> > 
> >  %wheel ALL=(ALL) NOPASSWD: ALL
> 
> This feels like fixing a loose screw with a sledgehammer.
> 
> This change allows any wheel group users to execute any command (via
> sudo) without authenticating.  That is to say, the change is far more
> broad than the originally stated issue you're trying to fix.  Do you
> implicitly trust all wheel group users that much?
> 
> sysfs/udisks, as stated previously, is probably the correct tool for
> the job.

What Matt said.

You have effectively elevated to root level all of your wheel users, without 
the need to use a root passwd.  There is a reason group wheel exists and this 
is not to duplicate root in terms of privileges.

Your issue/question is why does your DE, in this case XFCE, stopped mounting 
removable block devices.

The userspace application used by DEs is sys-fs/udisks.  You can use this on a 
terminal yourself:

udisksctl mount --block-device /dev/sdbX

There is also the sys-apps/pmount command.  However, in the first instance you 
should look into what XFCE offers for mounting removable block devices and if 
something is amiss with that.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 17:06       ` Michael
@ 2021-01-29 17:12         ` Matt Connell (Gmail)
  2021-01-29 17:40           ` thelma
  0 siblings, 1 reply; 16+ messages in thread
From: Matt Connell (Gmail) @ 2021-01-29 17:12 UTC (permalink / raw
  To: gentoo-user

On Fri, 2021-01-29 at 17:06 +0000, Michael wrote:
> what XFCE offers for mounting removable block devices and if 
> something is amiss with that.

Thelma,

I use XFCE as well.  I think (its been years since I set it up) what
you want is xfce-extra/thunar-volman to provide a "GUI file manager"
type of click-to-mount-a-device interface.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [gentoo-user] Re: mounting USB without root password
  2021-01-29 16:34   ` thelma
  2021-01-29 16:47     ` Matt Connell (Gmail)
@ 2021-01-29 17:37     ` Grant Edwards
  2021-01-29 18:18       ` Peter Humphrey
  1 sibling, 1 reply; 16+ messages in thread
From: Grant Edwards @ 2021-01-29 17:37 UTC (permalink / raw
  To: gentoo-user

On 2021-01-29, thelma@sys-concept.com <thelma@sys-concept.com> wrote:

> I uncommented in:  sudoers (it works)
> %wheel ALL=(ALL) ALL
>  %wheel ALL=(ALL) NOPASSWD: ALL

Wow. That seems extremely dangerous to me...

--
Grant




^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 17:12         ` Matt Connell (Gmail)
@ 2021-01-29 17:40           ` thelma
  2021-01-29 18:23             ` Matt Connell (Gmail)
  2021-02-06 21:00             ` thelma
  0 siblings, 2 replies; 16+ messages in thread
From: thelma @ 2021-01-29 17:40 UTC (permalink / raw
  To: gentoo-user

On 1/29/21 10:12 AM, Matt Connell (Gmail) wrote:
> On Fri, 2021-01-29 at 17:06 +0000, Michael wrote:
>> what XFCE offers for mounting removable block devices and if 
>> something is amiss with that.
> 
> Thelma,
> 
> I use XFCE as well.  I think (its been years since I set it up) what
> you want is xfce-extra/thunar-volman to provide a "GUI file manager"
> type of click-to-mount-a-device interface.

Thank you for correcting me.  I reverse the setting in sudoers.

I had the sys-fs/udisks and xfce-extra/thunar-volman installed so I enable in XFCE under:
- Removable Drivers and Media: --> Mount removable drives when hot-plugged.

It solved the problem.
 
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] Re: mounting USB without root password
  2021-01-29 17:37     ` [gentoo-user] " Grant Edwards
@ 2021-01-29 18:18       ` Peter Humphrey
  0 siblings, 0 replies; 16+ messages in thread
From: Peter Humphrey @ 2021-01-29 18:18 UTC (permalink / raw
  To: gentoo-user

On Friday, 29 January 2021 17:37:29 GMT Grant Edwards wrote:
> On 2021-01-29, thelma@sys-concept.com <thelma@sys-concept.com> wrote:
> > I uncommented in:  sudoers (it works)
> > %wheel ALL=(ALL) ALL
> > 
> >  %wheel ALL=(ALL) NOPASSWD: ALL
> 
> Wow. That seems extremely dangerous to me...

I suppose it is, but I've been running that way for years. I justify it with 
the knowledge that I'm the only user in the wheel group.

Someone's going to tell me off about that, I can just tell...

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 17:40           ` thelma
@ 2021-01-29 18:23             ` Matt Connell (Gmail)
  2021-01-30  8:46               ` Róbert Čerňanský
  2021-02-06 21:00             ` thelma
  1 sibling, 1 reply; 16+ messages in thread
From: Matt Connell (Gmail) @ 2021-01-29 18:23 UTC (permalink / raw
  To: gentoo-user

On Fri, 2021-01-29 at 10:40 -0700, thelma@sys-concept.com wrote:
> I reverse the setting in sudoers.

> - Removable Drivers and Media: --> Mount removable drives when hot-plugged.

Nice.  Glad you found the fix.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 18:23             ` Matt Connell (Gmail)
@ 2021-01-30  8:46               ` Róbert Čerňanský
  2021-01-30 21:14                 ` Neil Bothwick
  0 siblings, 1 reply; 16+ messages in thread
From: Róbert Čerňanský @ 2021-01-30  8:46 UTC (permalink / raw
  To: gentoo-user

On Fri, 29 Jan 2021 12:23:19 -0600
"Matt Connell \(Gmail\)" <matthewdconnell@gmail.com> wrote:

> On Fri, 2021-01-29 at 10:40 -0700, thelma@sys-concept.com wrote:
> > I reverse the setting in sudoers.  
> 
> > - Removable Drivers and Media: --> Mount removable drives when
> > hot-plugged.  
> 
> Nice.  Glad you found the fix.

And for completeness, if you want some command line goodness, there is
sys-apps/pmount.

man pmount...
pmount - mount arbitrary hotpluggable devices as normal user

So for example:
$ pmount /dev/sdc1

Mounts removable drive to /media/sdc1.

Then:
$ pumount /media/sdc1

Unmounts it.


-- 
Róbert Čerňanský
E-mail: openhs@tightmail.com
Jabber: hs@jabber.sk


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-30  8:46               ` Róbert Čerňanský
@ 2021-01-30 21:14                 ` Neil Bothwick
  0 siblings, 0 replies; 16+ messages in thread
From: Neil Bothwick @ 2021-01-30 21:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

On Sat, 30 Jan 2021 09:46:39 +0100, Róbert Čerňanský wrote:

> man pmount...
> pmount - mount arbitrary hotpluggable devices as normal user
> 
> So for example:
> $ pmount /dev/sdc1
> 
> Mounts removable drive to /media/sdc1.

Or, as I discovered by accident, if you are really lazy:

$ pmount sdc1


-- 
Neil Bothwick

If the cops arrest a mime, do they tell her she has the right to remain
silent?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-01-29 17:40           ` thelma
  2021-01-29 18:23             ` Matt Connell (Gmail)
@ 2021-02-06 21:00             ` thelma
  2021-02-06 21:34               ` Neil Bothwick
  1 sibling, 1 reply; 16+ messages in thread
From: thelma @ 2021-02-06 21:00 UTC (permalink / raw
  To: gentoo-user

On 1/29/21 10:40 AM, thelma@sys-concept.com wrote:
> On 1/29/21 10:12 AM, Matt Connell (Gmail) wrote:
>> On Fri, 2021-01-29 at 17:06 +0000, Michael wrote:
>>> what XFCE offers for mounting removable block devices and if 
>>> something is amiss with that.
>>
>> Thelma,
>>
>> I use XFCE as well.  I think (its been years since I set it up) what
>> you want is xfce-extra/thunar-volman to provide a "GUI file manager"
>> type of click-to-mount-a-device interface.
> 
> Thank you for correcting me.  I reverse the setting in sudoers.
> 
> I had the sys-fs/udisks and xfce-extra/thunar-volman installed so I enable in XFCE under:
> - Removable Drivers and Media: --> Mount removable drives when hot-plugged.
> 
> It solved the problem.

I'll revive this topic.  I have it working on one of my system but on my other (new system as well) auto-mounting in XFCE4 is not working,
I have in n XFCE under:
 - Removable Drivers and Media: --> Mount removable drives when hot-plugged (checked) 

user is in "wheel, usb" group.

When I plug the usb device the XFCE is trying to auto-mount the usb as the message is popping up but it keeps telling me: Authentication is required for mounting external /dev/sda1

Why it worked on one system but not on another?  
What is missing? 
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-02-06 21:00             ` thelma
@ 2021-02-06 21:34               ` Neil Bothwick
  2021-02-06 22:12                 ` thelma
  0 siblings, 1 reply; 16+ messages in thread
From: Neil Bothwick @ 2021-02-06 21:34 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 818 bytes --]

On Sat, 6 Feb 2021 14:00:54 -0700, thelma@sys-concept.com wrote:

> I'll revive this topic.  I have it working on one of my system but on my
> other (new system as well) auto-mounting in XFCE4 is not working, I
> have in n XFCE under:
>  - Removable Drivers and Media: --> Mount removable drives when
> hot-plugged (checked) 
> 
> user is in "wheel, usb" group.
> 
> When I plug the usb device the XFCE is trying to auto-mount the usb as
> the message is popping up but it keeps telling me: Authentication is
> required for mounting external /dev/sda1
> 
> Why it worked on one system but not on another?  

Check the groups of the user on both systems. Automounters often require
the user to be a member of the plugdev group.


-- 
Neil Bothwick

There's too much blood in my caffeine system.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] mounting USB without root password
  2021-02-06 21:34               ` Neil Bothwick
@ 2021-02-06 22:12                 ` thelma
  0 siblings, 0 replies; 16+ messages in thread
From: thelma @ 2021-02-06 22:12 UTC (permalink / raw
  To: gentoo-user

On 2/6/21 2:34 PM, Neil Bothwick wrote:
> On Sat, 6 Feb 2021 14:00:54 -0700, thelma@sys-concept.com wrote:
> 
>> I'll revive this topic.  I have it working on one of my system but on my
>> other (new system as well) auto-mounting in XFCE4 is not working, I
>> have in n XFCE under:
>>  - Removable Drivers and Media: --> Mount removable drives when
>> hot-plugged (checked) 
>>
>> user is in "wheel, usb" group.
>>
>> When I plug the usb device the XFCE is trying to auto-mount the usb as
>> the message is popping up but it keeps telling me: Authentication is
>> required for mounting external /dev/sda1
>>
>> Why it worked on one system but not on another?  
> 
> Check the groups of the user on both systems. Automounters often require
> the user to be a member of the plugdev group.

It is working now.  I login (crated XFCE) session via x2go and I think one need to first log-in as user, and make any changes in XFCE interface; and now loging via x2to session will work using XFCE auto-mounting.
 


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-02-06 22:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-29 15:21 [gentoo-user] mounting USB without root password thelma
2021-01-29 16:01 ` bobwxc
2021-01-29 16:34   ` thelma
2021-01-29 16:47     ` Matt Connell (Gmail)
2021-01-29 16:58       ` Matt Connell (Gmail)
2021-01-29 17:06       ` Michael
2021-01-29 17:12         ` Matt Connell (Gmail)
2021-01-29 17:40           ` thelma
2021-01-29 18:23             ` Matt Connell (Gmail)
2021-01-30  8:46               ` Róbert Čerňanský
2021-01-30 21:14                 ` Neil Bothwick
2021-02-06 21:00             ` thelma
2021-02-06 21:34               ` Neil Bothwick
2021-02-06 22:12                 ` thelma
2021-01-29 17:37     ` [gentoo-user] " Grant Edwards
2021-01-29 18:18       ` Peter Humphrey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox