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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encode a script 1

Status
Not open for further replies.

mediation

Technical User
Nov 11, 2006
17
Dear All,

I have some scripts and i want to encrept their contents from being read by other users in a way that will not affect their functionality .. i.e Other usres can excute them and cannot read the source as it contains some important passwords..

Please advise if anyone could help me in this issue..
Thanks in advance :)
 
Try shc, it's not fool proof but may be what your looking for.


Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
One KISS solution is.
[ol]
[li]Include all sensitive info in a file
[ol]
[li]chmod this file 700[/li]
[li]chown this file to root[/li]
[/ol][/li]
[li]Call this file from the main script using sudo[/li]
[/ol]
As I work mainly on AIX I use the /etc/security directory which has limited access, but there's nothing preventing you from creating, for example, /usr/local/secure_scripts.

Ceci n'est pas une signature
Columb Healy
 
A second and a star for columb.

I always use a sudo "wrapper" script and root owned 700 files to keep prying eyes out of sensitive scripts.

- Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top