Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

encrypting a file

Status
Not open for further replies.

pjb

Programmer
May 1, 2001
148
US
Is ther a way in unix for a file to be encrypted where a password must be supplied to make it readable?
 
pjb:

Depends on the unix flavor you're using. Check out the crypt command, encode or decode a file. My Solaris 7 has it.

I'd check out gnu.org. I'll be they have it.

Regards,

Ed
 
If you have the crypt command then try these...

cat file | crypt > file.x
crypt < file > file.x

You will be prompted for the password for encryption to the new file name. Just delete, change rights, etc.. for the source file.

crypt < file.x
crypt < file.x > file

Will prompt for the password to de-encrypt or

crypt password < file.x

works too but someone could spot your password with the ps command.

vi -x file.x

works too by prompting for the password as well.

Cheers,
ND [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top