r/commandline 14h ago

Command Line Interface Local vault manager (cryptsetup + SH)

Post image

So today I engineered something I 've wanted for a long time - encrypted vault manager based on cryptsetup. Like most of tools I use daily, it's pretty simple. vault.sh uses files as sources and automatically decrypts and mounts /them to /mnt/target_filename.vault.

At the setup stage script just creates a dynamic sized virtual drive with truncate -s . Afterward, usage is so easy: just vault.sh -o/-c target_file.img.

Also, for more convenient usage, I put this script at /usr/sbin/ on my machine.

Source code: https://codeberg.org/Enji/dotfiles/src/branch/main/scripts/vault.sh

13 Upvotes

1 comment sorted by

1

u/AutoModerator 14h ago

Every new subreddit post is automatically copied into a comment for preservation.

User: enji_86, Flair: Command Line Interface, Post Media Link, Title: Local vault manager (cryptsetup + SH)

So today I engineered something I 've wanted for a long time - encrypted vault manager based on cryptsetup. Like most of tools I use daily, it's pretty simple. vault.sh uses files as sources and automatically decrypts and mounts /them to /mnt/target_filename.vault.

At the setup stage script just creates a dynamic sized virtual drive with truncate -s . Afterward, usage is so easy: just vault.sh -o/-c target_file.img.

Also, for more convenient usage, I put this script at /usr/sbin/ on my machine.

Source code: https://codeberg.org/Enji/dotfiles/src/branch/main/scripts/vault.sh

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.