Password protection in unix

How to create a file in UNIX which is password protected ?

Thanks and Regards,
Neeraj

Have you seen GPG? GNU Privacy Guard: The GNU Privacy Guard - GnuPG.org

No :frowning: , but checkinG THAT now :slight_smile:

---------- Post updated at 08:03 AM ---------- Previous update was at 07:49 AM ----------

Still not able to figure it iut from there , my case i want to create a file which is passwd protected and send that file to a user who knows the passwd , so that only he can open that.

Any help ?

Trust me, GPG is what you are looking for!

Here are some usefull links:
-----> GnuPG Frequently Asked Questions
-----> Using GPG for encryption and signing /dev/dagon weblog
-----> Gnu Privacy Guard - How Gpg Works

Try :X option in vim.

:X      Prompt for an encryption key.  The typing is done without showing the
        actual text, so that someone looking at the display won't see it.

It is more or less impossible to prevent a user one a remote system from opening a file you sent him.
Thats why encryption is used. Opening a file will not help an unauthorized user in any way as he is not able to interpret its content.