Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rm -f /tmp/ldap-properties.tmp
- cd /usr/hdp/current/ranger-usersync/ldaptool/
- #RANGER ADMIN USER/PASS
- cat > /tmp/ldap-properties.tmp << EOF
- ranger.admin.auth.sampleuser=admin
- ranger.admin.auth.samplepassword=admin
- EOF
- HDP_VERSION="$(hdp-select versions)"
- cat /etc/ranger-usersync/$HDP_VERSION/0/ranger-ugsync-site.xml | grep --color -A 1 usersync.ldap | tr -d '\n' | sed 's/<name>//g' | sed 's/<\/name>\s*<value>/=/g' | sed 's/<\/value>--\s*/\n/g' | sed 's/^\s*//g' | sed 's/<\/value>//g' >> /tmp/ldap-properties.tmp
- printf "\n" >> /tmp/ldap-properties.tmp
- cat /etc/ranger-usersync/$HDP_VERSION/0/ranger-ugsync-site.xml | grep --color -A 1 ranger.usersync.group.objectclass | tr -d '\n' | sed 's/<name>//g' | sed 's/<\/name>\s*<value>/=/g' | sed 's/<\/value>--\s*/\n/g' | sed 's/^\s*//g' | sed 's/<\/value>//g' >> /tmp/ldap-properties.tmp
- printf "\n" >> /tmp/ldap-properties.tmp
- cat /etc/ranger-usersync/$HDP_VERSION/0/ranger-ugsync-site.xml | grep --color -A 1 ranger.usersync.group.memberattributename | tr -d '\n' | sed 's/<name>//g' | sed 's/<\/name>\s*<value>/=/g' | sed 's/<\/value>--\s*/\n/g' | sed 's/^\s*//g' | sed 's/<\/value>//g' >> /tmp/ldap-properties.tmp
- printf "\n" >> /tmp/ldap-properties.tmp
- cat /tmp/ldap-properties.tmp
- /usr/hdp/current/ranger-usersync/ldaptool/run.sh -i /tmp/ldap-properties.tmp && cat /usr/hdp/current/ranger-usersync/ldaptool/output/ldapConfigCheck.log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement