Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> hiding passwords in bash scirpts
aristosv
post Apr 7 2016, 06:21 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 8
Joined: 27-March 15
Member No.: 18,860



In Powershell if I want to hide the password in a script, I run this command:
CODE
Read-Host -assecurestring | convertfrom-securestring | Out-File C:\tmp\password.txt

I get a popup, enter my password and the text file is created containing a very long string of characters. If I need to use the password in a script I use this:
CODE
Get-Content C:\tmp\password.txt | ConvertTo-SecureString

This is convenient because I don't get password prompts when running scripts.

How can I do this on Linux, in a bash script?
Go to the top of the page
 
+Quote Post

Posts in this topic
- aristosv   hiding passwords in bash scirpts   Apr 7 2016, 06:21 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 15th December 2017 - 07:13 AM