Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 7363  / 1 Year ago, fri, november 25, 2022, 9:41:41

I have some important documents that I need to protect from anyone else having access to my machine.



The problem being the other persons have access to my machine via root account so changing the file permissions is not a option for me. I have seen apps like cryptkeeper but I was wondering can I password protect my files/folder by command line mode in ubuntu.


More From » password

 Answers
6

If other users have root access to the system, then the only way that I can see to protect your files/folders is encryption and decryption.



Lot of answers are listed here (in AskUbuntu) about encrypt/decrypt , but I will show the simplest method, in my opinion.



OpenSSL



Encrypt/Decrypt file



openssl aes-256-cbc -in file -out file.aes
openssl aes-256-cbc -d -in file.aes -out file


OpenSSL & Tar



Encrypt/Decrypt Folder



tar -zcf - directory | openssl aes-256-cbc -out directory.tar.gz.aes
openssl aes-256-cbc -d -in directory.tar.gz.aes | tar -xz -f -


Keep your decryption password out of the sight, and out of the System.


[#30455] Sunday, November 27, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hentor

Total Points: 482
Total Questions: 104
Total Answers: 111

Location: South Korea
Member since Sun, Dec 25, 2022
1 Year ago
;