| 1 |
|
| 2 |
# Create encrypted directory |
| 3 |
|
| 4 |
# Try to unlock with wrong passphrase |
| 5 |
[ERROR] fscrypt unlock: incorrect key provided |
| 6 |
mkdir: cannot create directory 'MNT/dir/subdir': Required key not available |
| 7 |
|
| 8 |
# Change passphrase |
| 9 |
|
| 10 |
# Try to unlock with old passphrase |
| 11 |
[ERROR] fscrypt unlock: incorrect key provided |
| 12 |
mkdir: cannot create directory 'MNT/dir/subdir': Required key not available |
| 13 |
|
| 14 |
# Unlock with new passphrase |
| 15 |
|
| 16 |
# Try to change passphrase (interactively, mismatch) |
| 17 |
spawn fscrypt metadata change-passphrase --protector=MNT:desc1 |
| 18 |
Enter old custom passphrase for protector "prot": |
| 19 |
Enter new custom passphrase for protector "prot": |
| 20 |
Confirm passphrase: |
| 21 |
[ERROR] fscrypt metadata change-passphrase: entered passphrases do not match |
| 22 |
|
| 23 |
# Change passphrase (interactively) |
| 24 |
spawn fscrypt metadata change-passphrase --protector=MNT:desc1 |
| 25 |
Enter old custom passphrase for protector "prot": |
| 26 |
Enter new custom passphrase for protector "prot": |
| 27 |
Confirm passphrase: |
| 28 |
Passphrase for protector desc1 successfully changed. |
| 29 |
|
| 30 |
# Lock, then unlock with new passphrase |
| 31 |
"MNT/dir" is now locked. |
| 32 |
mkdir: cannot create directory 'MNT/dir/subdir': Required key not available |