Good day !
I would like to know if it is possible to protect a file with a password, for example before you can less, or more to a file it will ask you a password before it will give access to the file. tnx
Good day !
I would like to know if it is possible to protect a file with a password, for example before you can less, or more to a file it will ask you a password before it will give access to the file. tnx
Not the file per say but you can encrypt a folder with True crypt. Is that what your looking to do? Also Nautilus has encryption functionalities.
You can use dd to create a fake partition and use cryptsetup to encrypt the false partition. If you store files within the partition then they can only be accessed after you successfully mount the partition and use the correct password.
all i want is everytime i access a certain file it will ask me a password for example i want to vi a file test1.
vi test1 --> after this command the system will ask me a password.
the file is a normal file not a directoy.
if it is possible in linux? if not in ubuntu any distro?
lucky you, someone just posted on commandlinefu about the vim password protection. just use vim -x {filename}
the post is on http://www.commandlinefu.com/commands/view/2100/add-password-protection-to-a-file-your-editing-in-vim.
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board