LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices



Reply
 
Search this Thread
Old 03-31-2008, 02:01 AM   #1
anhtt
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Rep: Reputation: 15
encode text file


I have a text file ( a script ). And I don't want anyone to read this file. How can I encode it?
 
Old 03-31-2008, 02:14 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
you could try mcypher or gpg
 
Old 03-31-2008, 02:32 AM   #3
anhtt
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Sorry.Can you explain more about mcypher/gpg ?
How can I use them ? And does they use on Sun Solaris ?

Thanks
 
Old 03-31-2008, 03:59 AM   #4
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 35
You could read something general about cryptography and, for example, gpg official documentation:
http://en.wikipedia.org/wiki/Cryptography
http://en.wikipedia.org/wiki/GNU_Privacy_Guard
http://gnupg.org/

Bye,
Enrico
 
Old 03-31-2008, 10:16 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,693
Blog Entries: 54

Rep: Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961Reputation: 2961
...or openssl: 'openssl enc -e -bf -in infile -out outfile'.
 
Old 03-31-2008, 01:49 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Or the good old (and quite weak) traditional Unix way:

Code:
$ crypt < clear-file > encrypted-file
Enter Key: ...
 
Old 04-02-2008, 11:30 AM   #7
anhtt
LQ Newbie
 
Registered: Jul 2007
Posts: 27

Original Poster
Rep: Reputation: 15
Hi Jlliagre

My text file is a script.After using "crypt" command, I can't run encoded script. Do you have another way ?
 
Old 04-02-2008, 01:18 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
You didn't tell you wanted to execute the script when encrypted. This is quite a different requirement.
 
Old 04-03-2008, 01:03 AM   #9
Kahless
Member
 
Registered: Jul 2003
Location: Pennsylvainia
Distribution: Slackware / Debian / *Ubuntu / Opensuse / Solaris uname: Brian Cooney
Posts: 503

Rep: Reputation: 30
as long as your security is set up properly and you are the only person with root access, you don't need to encrypt the file... you just need to set permissions properly on it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to store text(strings) in a 2D character array reading from a text file(C++) bewidankit Programming 3 02-14-2008 08:08 AM
encode text with md5sum or sha1sum GATTACA Programming 6 01-24-2008 08:24 AM
Steps needed to convert multiple text files into one master text file jamtech Programming 5 10-08-2007 12:24 AM
in Pascal: how to exec a program, discard text output or send to text file Valkyrie_of_valhalla Programming 6 05-02-2007 10:50 AM
how to change some text of a certain line of a text file with bash and *nix scripting alred Programming 6 07-10-2006 12:55 PM


All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration