How to use an encrypted usb drive? #191
Replies: 10 comments 3 replies
-
No clue, never tried. Not even sure that's supported.
But if you find out and give feedback I will be happy to include it in the
documentation.
Am Do., 9. März 2023 um 13:51 Uhr schrieb F1 Outsourcing Development <
***@***.***>:
… Which version of pam_usb are you running?
new
Which distribution are you using?
new
Which login manager and desktop environment are you using?
new
What happened?
I was trying to use an automatically decrypted usb drive. I am
experimenting a bit with the crypttab. How should I add a cryptsetup
device? Something in /dev/mapper/xxxxxx
Output of "pamusb-check --debug whoami"
Output of "w"
Output of "loginctl"
—
Reply to this email directly, view it on GitHub
<#190>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZI2U2FOT22IVPGCZ652BTW3HG4BANCNFSM6AAAAAAVVCMMZA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
pamusb only searches in /dev/ ? or can it be instructed to search in /dev/mapper or anywhere? |
Beta Was this translation helpful? Give feedback.
-
Maybe delete this here and put in discussions? I am not really c programmer, but looks like this supports depends on udisk not? |
Beta Was this translation helpful? Give feedback.
-
Yes, it does use UDisks. As long as UDisks picks up your crypto dev and recognizes it as removable it COULD work. But totally untested. |
Beta Was this translation helpful? Give feedback.
-
I removed everything from /etc/crypttab and /etc/fstab and did a touch /etc/udisks2/tcrypt.conf Now when I insert and remove the usb drive I am getting a prompt for the passphrase. If I use udiskctl dump, I am getting such output
However the pamusb-conf --add-device is not listing it |
Beta Was this translation helpful? Give feedback.
-
What does I guess it's 0. |
Beta Was this translation helpful? Give feedback.
-
Yes seems like it
Is it the responsibility of udisks2 to have this removable set by inheritance? |
Beta Was this translation helpful? Give feedback.
-
I get the impression the removable is like the rotational and there is not a direct relationship with services on the device, or at least there should not be. I read some stuff that sometimes drivers incorrectly set this, so it could be they just forgot to implement this properly. I noticed also that eg. the removable is not directly available on partitions, so it would be more logical to not even have this listed here at all. Maybe we should ask people at this udisk2 what supposed to be done. I could also be that it is required/expected/default of the kernel for such devices in the /dev/ root. I am not entirely sure what you need in bash or how bash can help you. If I would do something starting fromt the information supplied by udisk, one can probably start with this path:
this will get you the partition truecrypt is on, and something like this will get you the parent device
From which the removable state can be acquired. I don't really understand what happens here, this could be related to possible hidden volumes. I am just testing with some basic setup. Otherwise I can't really explain why one crypted device generates these 3 mappings.
Maybe a better approach would be to go the other way around? Get first all removable 'root' devices like /dev/sda, and then traverse the tree down to find possible mount points? |
Beta Was this translation helpful? Give feedback.
-
"I am not entirely sure what you need in bash or how bash can help you. If I would do something starting fromt the information supplied by udisk, one can probably start with this path:" The point of that was to find a way to reliably detect the removable bit. If I would have a starting point I could look into ways of adding such a detection and at least create an issue for it. But your suggestion looks already quite good anyway... "Maybe a better approach would be to go the other way around? Get first all removable 'root' devices like /dev/sda, and then traverse the tree down to find possible mount points" Maybe, but that would be quite a bit of work. Right now we just ask udisks for drives and check them for "removeability". If someone wants to do that change and submits a PR it could happen - but I wont spend any time on it. I would suggest to just create another unencrypted partition for pam_usb. Few megs are enough and already kinda overprovisioned. Or get something like this: https://www.amazon.de/dp/B071DGR6W5 if you absolutely want the encryption but don't want to work on it either. |
Beta Was this translation helpful? Give feedback.
-
I think this pam_usb is quite a nice idea, I do not get why it is not by default in fedora, or why redhat is not supporting the development of it. a I would like to use full disk encryption of the windows os on the laptop ? The problem with c is that if I lose both laptop and key, everything is accessible, which makes the use of total disk encryption useless. As you can see, I am clearly struggling with this concept. I guess you always need to find a compromise between such conflicting wishes, and probably a security expert knows best what to do here. [1] |
Beta Was this translation helpful? Give feedback.
-
Which version of pam_usb are you running?
new
Which distribution are you using?
new
Which login manager and desktop environment are you using?
new
What happened?
I was trying to use an automatically decrypted usb drive. I am experimenting a bit with the crypttab. How should I add a cryptsetup device? Something in /dev/mapper/xxxxxx
Output of "pamusb-check --debug
whoami
"Output of "w"
Output of "loginctl"
Beta Was this translation helpful? Give feedback.
All reactions