Quantcast
Channel: how to export all FreeIPA users list to a csv format? - Server Fault
Viewing all articles
Browse latest Browse all 3

Answer by Luc Deschenaux for how to export all FreeIPA users list to a csv format?

$
0
0

Late but full "copy/paste" answer (based on previous ones - thanks - I could have quit after writing ipa2json); for present and future needs.

export users with:

ipa user-find --all > ipa.txt

if the output is truncated adjust the limit with the command below and retry:

ipa config-mod --searchrecordslimit=######

if not yet installed, install nodejs (with nvm I suggest), eg:

wget https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bashnvm install --lts

install the required tools:

npm i -g ipa2jsonnpm i -g equalizejsonnpm i -g json2csv

convert ipa output to json with:

ipa2json ipa.txt > ipa.json

convert ipa output to json, equalize the json (you need all the fields in all the instances for proper csv conversion) and convert to csv :

ipa2json ipa.txt | equalizejson | json2csv > ipa.csv

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>