Skip to content

Instantly share code, notes, and snippets.

@nsabharwal
Created November 5, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsabharwal/ed498a4fbcfd75b7dd97 to your computer and use it in GitHub Desktop.
Save nsabharwal/ed498a4fbcfd75b7dd97 to your computer and use it in GitHub Desktop.
yum install expect*
#!/usr/bin/expect
spawn ambari-server sync-ldap --existing
expect "Enter Ambari Admin login:"
send "admin\r"
expect "Enter Ambari Admin password:"
send "admin\r"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment