LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-17-2017, 10:26 PM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 492

Rep: Reputation: 31
Question Encrypt shell script so it's executable but not readable


Got this situation where I need to embed a password into a shell script for the next few months. Want it so the script can't be read by anyone (even root) but is executable by everyone.

Can anyone point me to a good solution for this?
 
Old 01-17-2017, 11:14 PM   #2
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 492

Original Poster
Rep: Reputation: 31
ok how do you delete this post... figured out a way
 
Old 01-17-2017, 11:20 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,258
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
It is not possible to delete your post.

It would be better if you could share your solution with others here.
 
Old 01-18-2017, 08:12 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,610
Blog Entries: 4

Rep: Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905Reputation: 3905
Whenever possible, you should find ways to authenticate your scripts without the use of passwords. In a corporate setting, for instance, LDAP can be used for (say ...) MySQL authentication and authorization. There are no passwords in the script itself. The same thing can be done for SSH and even for web sites. The control is not based on "secrets," but rather central management.
 
Old 01-18-2017, 08:15 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
shc is used to do something like that, but it is not really safe.
 
  


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
shell script to encrypt Micky12345 Linux - General 2 03-13-2012 06:05 PM
[SOLVED] can i encrypt a shell script HuMan-BiEnG Linux - General 18 08-25-2010 02:19 PM
Make a Bash script executable but not readable onesikgypo Linux - Newbie 7 09-08-2009 09:58 AM
encrypt shell script Swakoo Linux - Security 29 02-08-2007 07:16 PM
Make a shell script executable but not readable davholla Linux - Security 5 03-24-2004 03:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:26 AM.

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
Open Source Consulting | Domain Registration