Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
Explorer

A quick easy way to export users from LDAP to a CSV for use in importing to Ambari.

ldapsearch -h ldapserver.mycompany.com -p 389 -D bind-user -w bind-password -b OU=London\ Users,OU=my\ dept,DC=mycompany,DC=com -s sub "(objectClass=user)" | grep sAMAccountName | sed 's/sAMAccountName://g' | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/'
738 Views
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎03-29-2017 08:34 AM
Updated by:
Contributors
Top Kudoed Authors