Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

1. Installed expect first:

# yum install expect -y 
(or use your Linux distribution's package manager if you're not Using CentOS or RHEL)

2. Then create and run the following expect script:

# cat /tmp/ambari-server-sync-ldap-unattended.sh
#!/usr/bin/expect 
set timeout 20
spawn /usr/sbin/ambari-server sync-ldap --groups=/etc/ambari-server/ambari-groups.csv
expect "Enter Ambari Admin login:" { send "admin\n" }
expect "Enter Ambari Admin password:" { send "notTheRealPasswordOfCourse\n" }
interact

3. If customer wants password to NOT be in plain text, ask them to look at something like Ansible which handles decrypting passwords from a file.

2,196 Views
Comments
avatar
New Member

Hi Sagar,

Thank you for providing details on automating the ldap-sys. It worked wonderfully.

Thanks,

Abhishek

Version history
Last update:
‎12-25-2016 07:18 AM
Updated by:
Contributors