2

I tried to install eCryptfs on my server to open an eCryptfs I did on my home computer.

I got these errors.

$ sudo mount -t ecryptfs /home/(place)/enc/ /home/(place)/enc/

Unable to get the version number of the kernel module. Please make sure that you have the eCryptfs kernel module loaded, you have sysfs mounted, and the sysfs mount point is in /etc/mtab. This is necessary so that the mount helper knows which kernel options are supported.

Make sure that your system is set up to auto-load your filesystem kernel module on mount.

Enabling passphrase-mode only for now.

Unable to link the KEY_SPEC_USER_KEYRING into the KEY_SPEC_SESSION_KEYRING; there is something wrong with your kernel keyring. Did you build key retention support into your kernel?

I have no idea what that means. My server has Debian on it. Should I do something?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Karel Bílek
  • 1,859
  • 5
  • 20
  • 26

3 Answers3

2

It is possibly because you were trying to mount inside screen or tmux. See: https://bugs.launchpad.net/ubuntu/+source/x2goclient/+bug/1377924

Try just a plain ssh login.

mwfearnley
  • 1,104
  • 1
  • 16
  • 19
Pieter
  • 196
  • 8
  • That was my issue. Not sure why that is the case. – Aspiring Dev May 11 '20 at 13:36
  • It works for me from a tmux screen, a tmux screen over ssh from WSL, but *not* from a tmux screen over ssh from Powershell. Which was only necessary at all because Hyper-V inexplicably started disconnecting immediately after entering my credentials making it impossible to connect any way *but* ssh. (A reboot fixed the last problem, but unfortunately was not possible before some long running process was completed) – Michael Oct 27 '22 at 17:48
  • Well this happened again and I found my own comment.. BUT the weird thing is, it HAS been working from a tmux screen over ssh from Powershell but it inexplicably stopped. Exiting tmux and restarting it seemed to have fixed the problem. – Michael Dec 14 '22 at 17:20
1

Try commenting out following line in /etc/pam.d/sshd:

session optional pam_keyinit.so force revoke

If you comment it out, new virtual sessions should allow ecryptfs mount to work. This worked for me with screen sessions. See this post.

ckujau
  • 1,385
  • 6
  • 15
Brad
  • 11
  • 1
1

It seems that OpenVZ is the problem (again). OpenVZ uses the parent kernel and I can't do anything with that.

Karel Bílek
  • 1,859
  • 5
  • 20
  • 26