Posted on 08-18-2020 08:22 PM
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.
Posted on 08-19-2020 04:41 AM
You will get mixed reviews on this, but here is a "solution" Jamf has provided: Jamf Encrypted Strings
Posted on 08-19-2020 06:03 AM
Short answer....you cant really.
You can hide the password but can't really encrypt it.