From: Stephen Powell on
On Tue, 6 Apr 2010 10:23:16 -0400 (EDT), Camaleón wrote:
>
> Uh? So it works fine for root user...
>
> O.K., Let me check with my USB flash drive. After I plugg it:
>
> ***
> sm01(a)stt008:~$ mount | grep fat
> /dev/sdc1 on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1000)
> ***
>
> I try to umount it:
>
> ***
> sm01(a)stt008:~$ umount /media/disk
> ***
>
> And now I verify it has been "really" umounted:
>
> ***
> sm01(a)stt008:~$ mount | grep fat
> ***
>
> Seems to be working here for my plain user.

I'll be the first to admit that I don't know much about this hotplug and
GUI stuff. The closest I come to a hotplug event is to load an audio
CD into my CD drive. I wait until the GNOME "Sound Juicer" application
auto-launches, wait for it to display the track titles, then I close the
window. I then type "cdplay" at a shell prompt to use the analog
play method. I never hot-plug a USB device, not because it's evil,
but because at this point I have no reason to do do. Maybe someday I'll
hot-plug a USB device, just to see how it feels! ;-)

But here's what I *do* know. The root user can issue mount or umount
commands for any file system or mount point. A non-root user *may* be able
to mount *some* file systems and *some* mount points depending on what is
specified in /etc/fstab. Here is an excerpt from the man page for mount:

----------

The non-superuser mounts.
Normally, only the superuser can mount filesystems. How-
ever, when fstab contains the user option on a line, any-
body can mount the corresponding system.

Thus, given a line

/dev/cdrom /cd iso9660 ro,user,noauto,unhide

any user can mount the iso9660 filesystem found on his
CDROM using the command

mount /dev/cdrom

or

mount /cd

For more details, see fstab(5). Only the user that
mounted a filesystem can unmount it again. If any user
should be able to unmount, then use users instead of user
in the fstab line. The owner option is similar to the
user option, with the restriction that the user must be
the owner of the special file. This may be useful e.g.
for /dev/fd if a login script makes the console user
owner of this device. The group option is similar, with
the restriction that the user must be member of the group
of the special file.

----------

HTH

--
.''`. Stephen Powell <zlinuxman(a)wowway.com>
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/881165932.1408881270568512045.JavaMail.root(a)md01.wow.synacor.com
From: jeremy jozwik on
On Tue, Apr 6, 2010 at 8:41 AM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
> A non-root user *may* be able
> to mount *some* file systems and *some* mount points depending on what is
> specified in /etc/fstab.  Here is an excerpt from the man page for mount:

GNU nano 2.0.7 File: /etc/fstab

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults
0 0
/dev/sda1 / ext3
errors=remount-ro 0 1
/dev/sda5 none swap sw
0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0
0


so, none of the media that i plug in is listed here. perhaps that is
because i always use the hotplug?


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/s2kf8d5d4f31004060852pe093a738q68af1f9040c4e8da(a)mail.gmail.com
From: Stephen Powell on
On Tue, 6 Apr 2010 11:08:55 -0400 (EDT), jeremy jozwik wrote:
>
> i am not familiar with those settings in linux. so i did some searching.
> http://wiki.debian.org/DebianDesktopHowTo
>
> which says:
> "This is a problem with the way D-Bus figures out what groups you are
> a member of. All users should be added to plugdev, netdev, and
> optionally powerdev, in /etc/groups. Any way of automating this in
> Debian?"
>
> i look around in /etc/ and find there are 2 group files.
>
> mobildebian:/etc# nano group
> group group-
>
> im guessing i need to remove group [ which is empty ] and rename
> group- to be the group file.
>
> correct?

Don't mess with /etc/group and /etc/group- !

Issue the "groups" command at a shell prompt to see which groups you
are in. To add a user to a group issue the following command at
the root shell prompt.

adduser <user-name> <group-name>

For example,

adduser fred dialout

To add user "fred" to the group "dialout". Fred will have to logout
of *all* of his sessions on the system, including restarting the X
server if he is the one who started the X server, before the change
will take effect. Logon as "fred" and issue the "groups" command.
If you don't see the new group, then you didn't logout of all of
fred's sessions. If all else fails, reboot. That will fix it.
After that, when fred issues the "groups" command, "dialout" should be
listed as one of his groups.

--
.''`. Stephen Powell <zlinuxman(a)wowway.com>
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/2124405614.1418611270570472625.JavaMail.root(a)md01.wow.synacor.com
From: Stephen Powell on
On Tue, 6 Apr 2010 11:52:18 -0400 (EDT), jeremy jozwik wrote:
> On Tue, Apr 6, 2010 at 8:41 AM, Stephen Powell <zlinuxman(a)wowway.com> wrote:
>> A non-root user *may* be able
>> to mount *some* file systems and *some* mount points depending on what is
>> specified in /etc/fstab.  Here is an excerpt from the man page for mount:
>
> GNU nano 2.0.7 File: /etc/fstab
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc defaults
> 0 0
> /dev/sda1 / ext3
> errors=remount-ro 0 1
> /dev/sda5 none swap sw
> 0 0
> /dev/hda /media/cdrom0 udf,iso9660 user,noauto 0
> 0
>
>
> so, none of the media that i plug in is listed here. perhaps that is
> because i always use the hotplug?

It would be interesting to see what Camaleón's /etc/fstab file looks
like in comparison with yours. Camaleón, are you listening? And would
you be willing to post your /etc/fstab file?

--
.''`. Stephen Powell <zlinuxman(a)wowway.com>
: :' :
`. `'`
`-


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/833218415.1421771270571145000.JavaMail.root(a)md01.wow.synacor.com
From: Camaleón on
On Tue, 06 Apr 2010 11:41:52 -0400, Stephen Powell wrote:

> On Tue, 6 Apr 2010 10:23:16 -0400 (EDT), Camaleón wrote:

>> Seems to be working here for my plain user.
>

(...)

> But here's what I *do* know. The root user can issue mount or umount
> commands for any file system or mount point. A non-root user *may* be
> able to mount *some* file systems and *some* mount points depending on
> what is specified in /etc/fstab. Here is an excerpt from the man page
> for mount:

The fact is that in my "/etc/fstab" there is no entry for "udev" devices
(i.e., USB flash drives) unless I manually add them.

So I think these kind of devices are dynamically detected and mounted as
soon as they get detected.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.04.06.16.30.28(a)gmail.com