LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Why does xfce FileManager non handle LUKS correctly? (https://www.linuxquestions.org/questions/slackware-14/why-does-xfce-filemanager-non-handle-luks-correctly-4175672204/)

MozillaUser3172 03-29-2020 05:25 PM

Why does xfce FileManager non handle LUKS correctly?
 
I insert a LUKS encrypted thumb drive.
I click the icon.
It asks for my password. OK so far so good.
Then it asks me for the root password. Why?
Later, when I'm done, I click the eject icon.
It fails to eject i.e. it fails to umount and then the luksClose. Why?
It gets so screwed up, I have to power down the computer to properly eject it.

brobr 03-30-2020 07:37 PM

I ran into the same hitch, and concluded that, well, maybe because it misses something, possibly the proper info to open the encrypted partition; luks (especially when combined with lvm like in my case) is more than just a password...

Below the script I use for one particular encrypted external drive for connection; note the names 'lukssdc1'; '4Tvg' were all generated when that luks-partition/volume group was created and registered with the machine it runs on, so don't copy. Best to read the Slackware/README_CRYPT.txt and Slackware/README_LVM.txt and follow the steps that suit and assemble these in a script that works.

After my drive is inserted and the icon shows I click the xfce-dialog for the password away and instead run this script from a terminal with 'start' as option (and the same with 'stop' before pulling the drive out..), then giving the password works....

Code:

# !/bin/bash
# steps to mount external DATA_ANALYSIS_4 drive
#
# /usr/local/sbin/DATA_ANALYSIS_4.sh
#
# start/stop

case "$1" in
  'start')
        #cryptsetup luksOpen /dev/sdc1 lukssdc1
        cryptsetup luksOpen UUID="3b76d01f-7aae-4385-8260-0b1445aefddf" lukssdc1
        lvchange -a y 4Tvg
        mount /dev/4Tvg/working_4Tb
;;
  'stop')
        umount /home/working/DATA_ANALYSIS_4
        lvchange -a n 4Tvg
        cryptsetup close lukssdc1
;;
  *)
    echo "Usage: $0 {start|stop}"
  ;;
esac

the script is combined with this line in /etc/fstab, so that the drive always loads at the same mount point (handy for making backups etc):
Code:

/dev/4Tvg/working_4Tb  /home/working/DATA_ANALYSIS_4  ext4    defaults    1  2
hth

MozillaUser3172 03-30-2020 07:44 PM

Quote:

Originally Posted by brobr (Post 6106062)

the script is combined with this line in /etc/fstab, so that the drive always loads at the same mount point (handy for making backups etc):

It's fun to solve these problems but at a certain point I just have to ask: Why don't they fix it?
One programmer fixing a problem is simpler than 100 users toiling to find a workaround.

bassmadrigal 03-30-2020 08:39 PM

Is this a problem with xfce itself or Slackware's implementation of xfce? Many distros are now using systemd and pam and if opening encrypted thumbdrives works as expected on those distros, it might be a limitation of the software Slackware uses or a bug with xfce that no one has notified them of.

MozillaUser3172 03-30-2020 10:12 PM

Quote:

Originally Posted by bassmadrigal (Post 6106079)
Is this a problem with xfce itself or Slackware's implementation of xfce? Many distros are now using systemd and pam and if opening encrypted thumbdrives works as expected on those distros, it might be a limitation of the software Slackware uses or a bug with xfce that no one has notified them of.

When I tried using debian it was far worse. There were two competing pieces of software trying to control the encrypted drive. At one point I ejected a drive using software #1 and the other piece of software #2 started producing infinite notifications springing up from the lower right complaining about its belief that something went wrong.

bassmadrigal 03-30-2020 11:47 PM

If that's the case, it seems this may be something you'd need to bring up to the xfce devs. Pat and team package upstream as vanilla as possible and if the problem doesn't seem to be with Slackware itself, it might be best to notify xfce devs and see if it's something on their end to fix.

brobr 03-31-2020 04:55 AM

Maybe the combination on this drive of luks with LVM, complicates it. The LVM layer is completely unnecessary in this case (a backup drive that only needed encryption) but I only realized this after all the stuff was already backed-up to it ...). But if the OP gets this behaviour with a luks only drive, then still the communication with cryptsetup is not handled or not in a way that suits a Slackware set-up.


All times are GMT -5. The time now is 08:43 PM.