Member since
07-31-2019
346
Posts
259
Kudos Received
62
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
2868 | 08-22-2018 06:02 PM | |
1662 | 03-26-2018 11:48 AM | |
4077 | 03-15-2018 01:25 PM | |
5050 | 03-01-2018 08:13 PM | |
1415 | 02-20-2018 01:05 PM |
11-06-2015
03:00 PM
3 Kudos
Here is the .sh script we used at the customers. You'll need to fill in your specific environment information. It runs the curl commands but also includes an LDAP filter. #!/bin/sh # Just in case we are run from cron with no path set... export PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin AMBARI_ADMIN_USER='admin:xxxxx' #
# Groups we want to look for, in this case any group name that starts with HDP_
#
GROUP_FILTER="(&(ObjectClass=Group)(CN=HDP_*))"
SEARCH_BASE=DC=MYDOMAIN,DC=com
SEARCH_USER=CN=search_user,OU=LDAP,${SEARCH_BASE}
SEARCH_PASSWD=ldapUserPassword LDAP_HOST=ldap.mydomain.com LDAPGROUPS=`ldapsearch -h $LDAP_HOST -x -s sub -b ${SEARCH_BASE} -D ${SEARCH_USER} -w ${SEARCH_PASSWD} "${GROUP_FILTER}" cn | grep ^dn: | cut -d' ' -f2- | sed -e "s/\(.*\)/(memberOf=\1)/" | tr '\n' ':' | sed -e "s/://g"` # Filter for users with a "valid" flag set who have a first name, last name and email.
SEARCH_FILTER="(&(objectClass=USER)(mail=*mydomain.com)(givenName=*)(sn=*)(!(msexchuserAccountControl:1.2.840.113556.1.4.803:=2))(|$LDAPGROUPS))" # perform the search on AD and format the results in a way that postfix wants. #ldapsearch -h <ldap.company.com> -x -D “${SEARCH_USER}” -w “${SEARCH_PASSWD}” "${SEARCH_FILTER}" sAMAccountName | \ grep -v "{" | \ cut -d: -f3 | \ sort -u > ${TEMP_FILE} USERLIST=`ldapsearch -h $LDAP_HOST -x -s sub -b ${SEARCH_BASE} -D ${SEARCH_USER} -w ${SEARCH_PASSWD} "${SEARCH_FILTER}" sAMAccountName |\
grep -i sAMAccountName |\
grep -v ^# |\
sort -u |\
awk '{print $2}' |\
tr '\n' , |\
tr '[A-Z]' '[a-z]' |\
sed -e "s/,$//"` GROUPLIST=`ldapsearch -h $LDAP_HOST -x -s sub -b ${SEARCH_BASE} -D ${SEARCH_USER} -w ${SEARCH_PASSWD} "${SEARCH_FILTER}" memberOf |\
grep memberOf |\
grep -v ^# |\
grep HDP_ |\
sort -u |\
cut -d: -f2 |\
cut -d= -f2 |\
cut -d, -f1 |\
awk '{print $1}' |\
tr '\n' , |\
sed -e "s/,$//"` # Sync new users and groups curl -s -H "X-Requested-By: ambari” -u $AMBARI_ADMIN_USER -d '{"Event": {"specs": [{"principal_type": "users", "sync_type": "specific", "names": "'$USERLIST'"}, {"principal_type": "groups", "sync_type": "specific", "names": "'$GROUPLIST'"}]}}' http://127.0.0.1:8080/api/v1/ldap_sync_events >/dev/null sleep 30
# Sync existing users and groups curl -s -H "X-Requested-By: amber” -u $AMBARI_ADMIN_USER -d '{"Event": { "specs": [{"principal_type": "users", "sync_type": "existing"}, {"principal_type": "groups", "sync_type": "existing"}]}}' http://127.0.0.1:8080/api/v1/ldap_sync_events >/dev/null echo "AmbariLdapSync complete at `date`" exit 0
... View more
11-05-2015
08:13 PM
1 Kudo
We ended up going with Paul's solution and didn't try to delete from Oracle. Thanks for all your input and help!
... View more
11-05-2015
06:50 PM
We went down the path of deleting directly from Oracle but ran into a bunch of relational constraints.
... View more
11-05-2015
06:40 PM
That's sets up LDAP but I need to automate the sync process. I would like Ambari to execute the sync-ldap --existing command once a day.
... View more
11-05-2015
06:25 PM
I want to automate through cron or other method "ambari-server sync-ldap --existing" but it prompts for an Ambari username and password. Any ideas on how I can automate an Ambari LDAP sync?
... View more
Labels:
- Labels:
-
Apache Ambari
11-05-2015
06:06 PM
1 Kudo
I loaded LDAP accounts into Ambari and now need to remove them and re-sync. How do I remove the accounts?
... View more
Labels:
- Labels:
-
Apache Ambari
11-02-2015
09:41 PM
When installing Ranger in a production environment we do not have access to sysadmin privileges. Is there anyway to install Ranger without using sysadmin?
... View more
Labels:
- Labels:
-
Apache Ranger
10-14-2015
07:02 PM
This issue has been resolved. We enabled supervisord because of STORM-130 which is addressed in HDP 2.3. After the upgrade we had to shut down supervisord and bring up the Supervisors via Ambari. Once that was done everything is green.
... View more
10-12-2015
08:46 PM
powerbidatabases.pngWithin the Power BI workspace in Office 365 I'm only seeing connectors for Azure SQL Database, Azure SQL Data Warehouse, SSAS, and Spark on Azure HDInsight. I'm not seeing a connector to Hadoop or HDI. Is this feature not available?
... View more
Labels:
10-06-2015
03:10 PM
We recently moved 4 supervisor servers from bare metal to VM. We then upgraded Ambari to 2.1.2. After the upgrade Ambari is showing the supervisor hosts as still being the original bare metal servers. We are running HDP 2.2.0.
... View more
Labels:
- Labels:
-
Apache Ambari
-
Apache Storm
- « Previous
- Next »