Skip to main content
Question

Hashed password as parameter for a script


Forum|alt.badge.img+1

Would anyone know how I would encrypt a password for use as a parameter in a script so I can pass that password to the script securely and then have the script decrypt the password so it could be used? I'm running a script that will prompt a Filevault enabled user for their password so that a local admin account can be added to Filevault. It works if I plaintext the admin password in the script, but obviously I don't want to do that. I'd like to be able to put the encrypted password as a parameter and then just call it to the script, but I'm sure I'd have to add the salt to the script in order for it to decrypt it...just have no clue how to do that myself.

2 replies

DBrowning
Forum|alt.badge.img+24
  • Esteemed Contributor
  • 668 replies
  • August 19, 2020

You will get mixed reviews on this, but here is a "solution" Jamf has provided: Jamf Encrypted Strings


boberito
Forum|alt.badge.img+22
  • Jamf Heroes
  • 449 replies
  • August 19, 2020

Short answer....you cant really.

You can hide the password but can't really encrypt it.

obfuscation vs encryption


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings