Skip to content

Instantly share code, notes, and snippets.

@frayos
Last active June 27, 2018 14:25
Show Gist options
  • Save frayos/0ac7c23ab244ea4f542830333f4b44e5 to your computer and use it in GitHub Desktop.
Save frayos/0ac7c23ab244ea4f542830333f4b44e5 to your computer and use it in GitHub Desktop.
viya-sas-bootstrap-config.sh LDAP
##################################################
#author : David Helwig
# Usage Note 61882: Troubleshooting identities and the identities service in SAS® Viya® http://support.sas.com/kb/61882
# If you don't understand the below, don't use it
# you'll end breaking your Deployment
#####################################################
export CONSUL_TOKEN=$(cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token)
export CONSUL_TOKEN=$(cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/management.token)
##### GATHER ALL IDENTITIES CONFIGURATION VIYA ##################
### *NOTE, the password is displayed in plain text in this result. Mask the password before sharing the results and protect/delete the file the command created.
###############################################################################################################
echo sudo /opt/sas/viya/home/bin/sas-bootstrap-config kv read --recurse config | grep sas.identities.providers.ldap >> /tmp/identconfig.txt
############################################################################################################
#### WRITE any value ###
#### !!!! CAUTION, do not use if you do not know what you are doing as you will break your Deployment !!! ####
VALUE="config/identities/sas.identities.providers.ldap.user/emailAddress.work"
KEY="mail"
echo sudo /opt/sas/viya/home/bin/sas-bootstrap-config kv write --force "$VALUE" "$KEY"
####################################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment