How to mount disk without root psw NEVER AND FOREVER.

New to Debian (Or Linux in general)? Ask your questions here!

How to mount disk without root psw NEVER AND FOREVER.

Postby leondante » 2018-12-02 11:17

Hello. Yes, is a stupid question, but I've been looking for this long enough to be really tired and to beg PLEASE HELP ME. I don't know where is still another place to look for info about this.

I want to put a simple USB drive into my PC and be able to mount that sthing, write on it and take it out safely without having to put the freaking roooooot password.

I'm tired of it, I work with different pen drives all the time. :c

Please, I beg you, halp me. :c :c :c

I have Debian 9.5 and tried some solutions by dconf, but didn't solved it.

Thank you for your patience and for any help.
leondante
 
Posts: 6
Joined: 2018-11-12 19:43

Re: How to mount disk without root psw NEVER AND FOREVER.

Postby bw123 » 2018-12-02 13:14

There are probably several good solutions that will work for you. There are some apps like pmount, usbmount, and udiskie, also I think I rememeber a universal automount thing, like uam. They probably all have different instructions. I've read a lot about udev rules, but because I only have a few devices I really don't need to mess with it. Also, I'm sure some desktop environments take careof this for you. They all have different GUI dialogs.

For myself, I just put the usb partitions in /etc/fstab and add myself to the 'users' group. Seems to be a very robust solution that works on all setups.
Code: Select all
UUID=XXXX-XXXX /media/flash/whatever vfat rw,users,noauto 0 0

That is the simplest. You can make it more complicated. Try it like that, then after awhile try some different options and read some man pages.
Code: Select all
UUID=XXXX-XXXX /media/flash/whatever vfat rw,users,nofail,x-systemd.automount,x-systemd.idle-timeout=3 0 0
User avatar
bw123
 
Posts: 3572
Joined: 2011-05-09 06:02
Location: TN_USA

Re: How to mount disk without root psw NEVER AND FOREVER.

Postby Head_on_a_Stick » 2018-12-02 13:56

For a less restrictive option try user rather than users, this allows anybody to mount (and `umount`) the drive.

Note that nofail & noauto are needed to avoid boot delays if the device is not plugged in at that time.

This seems to work for my normal user:
Code: Select all
# /etc/fstab
UUID=8296-FDB9 /mnt vfat rw,user,nofail,noauto 0 0

The UUID was taken from the output of the `blkid` command (with the device plugged in).
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8315
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: How to mount disk without root psw NEVER AND FOREVER.

Postby leondante » 2018-12-03 15:41

Thanks for the info. The thing is that I use different drives frequently, that are not mine, so the UUID changes with each one. I started with these steps for mine but still the issue is there with other ones from other people. I use to connect SATA drives from other computers into a bay I have. And there is the main annoying issue.
leondante
 
Posts: 6
Joined: 2018-11-12 19:43

Re: How to mount disk without root psw NEVER AND FOREVER.

Postby wizard10000 » 2018-12-03 16:34

Desktop environments should automount. If you're using just a window manager is gvfs installed?
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1299
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: How to mount disk without root psw NEVER AND FOREVER.

Postby bw123 » 2018-12-03 17:03

If you are using udisks2 with policykit, it looks like members of 'admin' group would not need a password?
/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy
User avatar
bw123
 
Posts: 3572
Joined: 2011-05-09 06:02
Location: TN_USA


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable