:: Re: [DNG] automount, mount, and USB…
Forside
Slet denne besked
Besvar denne besked
Skribent: Gregory Nowak
Dato:  
Til: dng
Emne: Re: [DNG] automount, mount, and USB sticks
On Tue, Jul 28, 2015 at 03:17:11PM -0400, Hendrik Boom wrote:
> Of course I have to guess whether the device has
> been plugged in as /dev/sdb, or /dev/sde, or whatever. In case of
> (frequent) doubt, I switch to a root console with control-alt-F1 and a
> login, unplug the device, and plug it in again. It will the tell me
> after a while, that a new device has been inserted, and tell me what
> /dev/sd* name it has dynamically installed. I end up, as root,
> mounting the device with root as the owner. It's usually a USB stick
> with one of the ubiquitous Microsoft file systems used on USB sticks,
> and all the files can be read or writen by root only.


There is a much easier way. Instead of switching consoles and
guessing, just plug the device in, and look at the last screen full of
the output from dmesg. Also, if you're mounting on your own laptop, it
will usually have one hd, /dev/sda. When you plug in a usb device, it
will probably have /dev/sdb. If you unplug it, and plug in the same
device, or plug in another stick, it will probably have /dev/sdb
still. So, you could just put a line in /etc/fstab which will allow a
normal user to mount /dev/sdb1 for example to whatever directory you
want. All you would have to do as a normal user is to type:
mount /dev/sdb1
after plugging in the drive, and you should be able to find its'
contents under whatever directory you specified in fstab.

Greg


--
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-manager@???