Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-21-2019, 11:35 AM   #1
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,048

Rep: Reputation: 165Reputation: 165
Disable "Enter a passphrase..." dialog?

I am running CentOS 7.6 with the Mate desktop from epel. When I plug in a USB device such as a flash drive or hard drive which is encrypted with cryptsetup/LUKS I am presented with a dialog "Enter a passphrase to unlock the volume." This is cool except...

As part of my backup scheme I am archiving important files to an encrypted hard drive. I have a script which will:

1 - unlock the encrypted file system using a key-file
2 - mount the now unlocked file system located at /dev/mapper/backup
3 - perform various housekeeping and backup tasks
4 - unmount the backup file system
5 - relock the encrypted file system
6 - (will add this step) power down the USB drive to allow it to be disconnected

This works OK except that when the "Enter a passphrase..." dialog is present and I run the script I get a notification window "Unable to mount (file system label) - Operation was cancelled." However, the file system was in fact unlocked, mounted etc. The problem is that I have two unnecessary dialogs which I need to respond to/windows to close.

If I use dconfeditor and navigate to org/mate/desktop/media-handling/ and disable automount the above described issue is resolved. BUT... now the OS will not automount non-encrypted flash drives etc. I am not sure which is more of a pain

What I am looking for is a way to disable just the passphrase dialog. Any ideas?


Old 07-22-2019, 08:20 AM   #2
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 852

Rep: Reputation: 258Reputation: 258Reputation: 258
So, I think you are getting "Enter a passphrase dialogue box" because OS is trying to automount the encrypted USB drive...
Found this; it may work?

Have you tried putting it in fstab by UID and noauto option?

Last edited by dc.901; 07-22-2019 at 08:22 AM.
Old 07-22-2019, 10:04 AM   #3
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,048

Original Poster
Rep: Reputation: 165Reputation: 165
Thanks dc.901,

That sounded like a great idea. However, in CentOS 7.6 it does not seem to work. My fstab line is
UUID=2d2f49ba---/nowhere ext4  noauto 1 2
The man page tells me that the noauto option
noauto do not mount when "mount -a" is given (e.g., at boot time)
I guess the USB mounting process uses something different.

The more I think about it the more I like the idea of turning automount off in dconf as a security precaution. I always turn off auto-open, auto-run, thumbnailer. If I plug in a flash drive with automount off it is not present if I attempt to access it in a terminal. However, if I click on it in the file browser it does wake up and mount.

Thanks again,

Old 07-22-2019, 09:28 PM   #4
LQ Newbie
Registered: Jul 2019
Posts: 1

Rep: Reputation: Disabled
You might want to try using autofs instead of the gnome/mate automounter, it is more configurable (using the /etc/auto.* files).

Last edited by davehensley; 07-22-2019 at 09:39 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Focus by default on password box in plasma-nm's "enter PPTP password" dialog window Slackware 3 03-05-2016 04:52 PM
Reproducing Alt-F2 run dialog effect (focus dialog box, dim and disable rest of desktop) in LinuxMint Cinnamon in other applications. kevin77v Linux - Desktop 0 01-20-2016 01:44 PM
ssh inside ssh asks for "Enter passphrase for key..." hedpe Linux - Newbie 1 04-30-2012 10:20 AM
"Enter Key" not working, how to map "Enter Key" functionality to "F9" Key srinihi Linux - Newbie 1 04-03-2009 03:46 PM
Mandriva: How can I get rid of "Enter passphrase for ~/.../.ssh/id_sda" rm_-rf_windows Linux - General 3 07-07-2007 04:00 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration