EncFS/README.md

60 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2023-05-04 11:04:04 +02:00
## EncFS
2023-09-27 09:41:32 +02:00
instalaltion du package
2023-05-04 11:04:04 +02:00
```
sudo apt install encfs
```
2023-09-27 09:41:32 +02:00
Formater un support amavible exemple clef USB ou SD
2023-05-04 11:04:04 +02:00
```
2023-05-04 10:57:06 +02:00
dd if=/dev/urandom if=/media/xavier/Secure/passphrase.bin bs=16k count=1
2023-05-04 11:04:04 +02:00
```
2023-09-27 09:41:32 +02:00
Préparation création de répertoire
dans votre répertorie pero
mkdir decrypted
mkdir encrypted
2023-05-04 10:57:06 +02:00
2023-09-27 09:41:32 +02:00
Création de la liaison entre les 2 répertoire via encfs
2023-05-04 11:04:04 +02:00
```
2023-05-04 10:57:06 +02:00
encfs ~/encrypted ~/decrypted
2023-05-04 11:04:04 +02:00
```
2023-05-04 10:57:06 +02:00
choisir mode p
et un pass provisoir
2023-09-27 09:41:32 +02:00
aller dans votre media amovible
ex:
```
cd /media/$USER/Usb
```
2023-05-04 10:57:06 +02:00
2023-09-27 09:41:32 +02:00
Pour la génération de passphrase.bin Pour la génération de passphrase.bin
```
2023-09-27 10:02:22 +02:00
ssh-keygen -t rsa -f passphrase.bin
2023-09-27 09:41:32 +02:00
```
2023-05-04 10:57:06 +02:00
2023-09-27 10:02:22 +02:00
Signature et affectation de passphrase.bin par password de encfs
2023-05-04 11:04:04 +02:00
```
2023-09-27 10:02:22 +02:00
echo -n "Enter current password: " && read -s PASSWORD && (echo $PASSWORD && base64 -w 0 passphrase.bin) | encfsctl autopasswd ~/.encrypted
2023-05-04 11:04:04 +02:00
```
2023-09-27 09:41:32 +02:00
2023-09-27 10:02:22 +02:00
Puis ouverture via passphrase.bin et non plus le password
2023-05-04 11:04:04 +02:00
```
2023-09-27 10:02:22 +02:00
base64 -w 0 passphrase.bin | encfs -S ~/.encrypted ~/decrypted
2023-05-04 11:04:04 +02:00
```
2023-05-04 10:57:06 +02:00
et pour démonter
2023-05-04 11:04:04 +02:00
```
fusermount -u ~/decrypted
```
2023-09-27 09:48:48 +02:00
## Automatisation via script coffre
à placer dans /usr/local/sbin
nommer coffre
Il faudra labeliser le media amovible SECURE
contenant passphrase.bin
la synthaxe:
coffre open
coffre close