Ask Your Question
0

How do I mount a partition without fedora asking for my password?

asked 2016-09-28 14:51:14 -0600

sgtnasty gravatar image

I have another interna hard drive, and I dont want to put it in /etc/fstab, but when I click on it, Fedora asks for my password. Do I need to belong to a specific group?

edit retag flag offensive close merge delete

Comments

Can you let me know which DE you are using? In Plasma 5 (KDE), the Device Notifier will allow you to mount drives as a normal user to /run/media/$username. It will mount drives here automatically when you open them from the Device Notifier.

Striker gravatar imageStriker ( 2016-09-28 20:26:54 -0600 )edit

GNOME 3.20

sgtnasty gravatar imagesgtnasty ( 2016-09-29 10:04:34 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-09-28 15:28:22 -0600

sideburns gravatar image

I'm sorry, but I don't think you can have what you want. You can either put your drive in /etc/fstab, or you can give your password every time you mount it.

However, if you don't want it to mount at boot, there's a way to do that (and not give your password) by using the proper mount options. Instead of specifying defaults, use noauto user which tells the system not to mount the drive unless specifically told to and to allow users to mount the drive without a password.

edit flag offensive delete link more

Comments

Ubunutu does it and has been for years.

sgtnasty gravatar imagesgtnasty ( 2016-09-29 10:04:50 -0600 )edit
0

answered 2017-02-14 08:26:33 -0600

enaut gravatar image

You can do this, by adding your own rule (.pkla) file with appropriate content at the appropriate location.

sudo gedit /etc/polkit-1/rules.d/99-mount-partitions.rules

it will open an empty file. Just paste the following into the file to give anyone marked as administrator (belonging to the unix group wheel) the right to mount without password.

// Password-less mounting of local partitions
polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.udisks2.filesystem-mount-system" && subject.isInGroup("wheel")) {
       return polkit.Result.YES;
    }
});

Save the document, and it should work instantly (without the need of logout or reboot or anything).

A more elaborate answer is here: https://ask.fedoraproject.org/en/ques...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-28 14:51:14 -0600

Seen: 770 times

Last updated: Feb 14 '17