Eu tenho um problema com o login no xubuntu e descriptografia da minha pasta pessoal.
Quando estou tentando fazer login, a tela pisca e nada aconteceu.
informações do syslog naquele momento:
Aug 7 15:22:20 xu sudo: pam_ecryptfs: Passphrase file wrapped
Aug 7 15:22:20 xu sudo: pam_ecryptfs: Unable to rewrap passphrase file
Aug 7 15:22:20 xu sudo: Failed to detect wrapped passphrase version: Permission denied
Aug 7 15:22:20 xu sudo: Error attempting to unwrap passphrase from file [/home/sergei/.ecryptfs/wrapped-passphrase]; rc = [-13]
Aug 7 15:22:20 xu sudo: pam_ecryptfs: Error adding passphrase key token to user session keyring; rc = [-5]
Aug 7 15:23:06 xu lightdm: pam_ecryptfs: Passphrase file wrapped
Aug 7 15:23:06 xu lightdm: pam_ecryptfs: Unable to rewrap passphrase file
Aug 7 15:23:06 xu lightdm: Failed to detect wrapped passphrase version: Permission denied
Aug 7 15:23:06 xu lightdm: Error attempting to unwrap passphrase from file [/home/sergei/.ecryptfs/wrapped-passphrase]; rc = [-13]
Aug 7 15:23:06 xu lightdm: pam_ecryptfs: Error adding passphrase key token to user session keyring; rc = [-5]
Aug 7 15:23:07 xu systemd[1]: Started Session c6 of user sergei.
Aug 7 15:23:07 xu lightdm[2973]: Signature not found in user keyring
Aug 7 15:23:07 xu lightdm[2973]: Perhaps try the interactive 'ecryptfs-mount-private'
Aug 7 15:23:07 xu lightdm[2973]: Error writing X authority: Failed to open X authority /home/sergei/.Xauthority: Permission denied
Aug 7 15:23:07 xu acpid: client 3689[0:0] has disconnected
Aug 7 15:23:07 xu acpid: client connected from 3897[0:0]
Aug 7 15:23:07 xu acpid: 1 client rule loaded
Aug 7 15:23:07 xu systemd[1]: Started Session c7 of user lightdm.
Consegui fazer o login através do console Ctl + Alt + F1, então decidi montar meu diretório pessoal manualmente. Mas recebeu um erro:
sergei@xu:~$ ecryptfs-mount-private
Enter your login passphrase:
Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
Info: Check the system log for more information from libecryptfs
ERROR: Your passphrase is incorrect
Enter your login passphrase:
Syslog:
Aug 7 15:30:49 xu ecryptfs-insert-wrapped-passphrase-into-keyring: Failed to detect wrapped passphrase version: Permission denied
Aug 7 15:30:49 xu ecryptfs-insert-wrapped-passphrase-into-keyring: Error attempting to unwrap passphrase from file [/home/sergei/.ecryptfs/wrapped-passphrase]; rc = [-13]
Eu tentei verificar minha frase secreta:
sergei@xu:~$ ecryptfs-unwrap-passphrase
Passphrase:
Error: Unwrapping passphrase failed [-13]
Info: Check the system log for more information from libecryptfs
Syslog:
Aug 7 15:28:47 xu ecryptfs-unwrap-passphrase: Failed to detect wrapped passphrase version: Permission denied
Mas na senha de desempacotamento de root funciona bem:
sergei@xu:~$ sudo ecryptfs-unwrap-passphrase /home/sergei/.ecryptfs/wrapped-passphrase
Passphrase:
mypassphrase_here
Bem, eu não esqueci minha senha. A saída foi igual à frase que estou inserindo. Porém, a saída não é aquela longa frase aleatória, que foi gerada automaticamente há muito tempo.
Depois desses problemas, decidi montá-lo de maneira diferente:
sergei@xu:~$ ecryptfs-add-passphrase --fnek
Passphrase:
Inserted auth tok with sig [e94f5149955202f3] into the user session keyring
Inserted auth tok with sig [6a7465b6ae998f18] into the user session keyring
sergei@xu:~$ sudo mount -t ecryptfs /home/sergei/.Private /mnt/
Passphrase:
Select cipher:
1) aes: blocksize = 16; min keysize = 16; max keysize = 32
2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56
3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24
4) twofish: blocksize = 16; min keysize = 16; max keysize = 32
5) cast6: blocksize = 16; min keysize = 16; max keysize = 32
6) cast5: blocksize = 8; min keysize = 5; max keysize = 16
Selection [aes]:
Select key bytes:
1) 16
2) 32
3) 24
Selection [16]:
Enable plaintext passthrough (y/n) [n]:
Enable filename encryption (y/n) [n]: y
Filename Encryption Key (FNEK) Signature [e94f5149955202f3]: 6a7465b6ae998f18
Attempting to mount with the following options:
ecryptfs_unlink_sigs
ecryptfs_fnek_sig=6a7465b6ae998f18
ecryptfs_key_bytes=16
ecryptfs_cipher=aes
ecryptfs_sig=e94f5149955202f3
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.
Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [e94f5149955202f3] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : no
Not adding sig to user sig cache file; continuing with mount.
Mounted eCryptfs
Como visto acima, recebi um erro e o ignorei. Mas no diretório montado há apenas um monte de arquivos ECRYPTFS_FNEK_ENCRYPTED.
Eu tentei recuperar meu diretório, mas recebi erro e nenhuma informação de syslog:
sergei@xu:~$ sudo ecryptfs-recover-private
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/home/.ecryptfs/sergei/.Private].
Try to recover this directory? [Y/n]: y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] y
INFO: Enter your LOGIN passphrase...
Passphrase:
Inserted auth tok with sig [e94f5149955202f3] into the user session keyring
ERROR: The key required to access this private data is not available.
Eu tentei novamente, mas desta vez eu disse que não tenho senha de login e inseri essa longa senha aleatória:
sergei@xu:~$ sudo ecryptfs-recover-private
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/home/.ecryptfs/sergei/.Private].
Try to recover this directory? [Y/n]: y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] n
INFO: To recover this directory, you MUST have your original MOUNT passphrase.
INFO: When you first setup your encrypted private directory, you were told to record
INFO: your MOUNT passphrase.
INFO: It should be 32 characters long, consisting of [0-9] and [a-f].
Enter your MOUNT passphrase:
INFO: Success! Private data mounted at [/tmp/ecryptfs.4qCNYRo6].
Mas, em /tmp/ecryptfs.4qCNYRo6
, há muitos arquivos ECRYPTFS_FNEK_ENCRYPTED novamente.
Então, o que devo fazer para resolver meus problemas?
Eu realmente não quero perder meu diretório pessoal.