Linux – how to export all FreeIPA users list to a csv format

freeipaldaplinuxredhat

How can export all FreeIPA users to a csv file?

Best Answer

This command worked for me:

ipa user-find --all | grep -E "User Login|First|Last|UID|Email" > IPA_RAW.txt

after that, use this perl line to convert the format:

perl -ne 'chomp; print $_ . (($. % 8) ? "," : "\n")' IPA_RAW.txt | awk "Add your filters here" > users-list.csv

thanks