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.


Sign Up Now
Reply to this topicStart new topic
> hiding passwords in bash scirpts
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:
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:
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

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: 18th July 2018 - 07:50 AM