IPA user-add multiple users via script

When adding multiple users in IDM/freeIPA its a pain inputting each user and its time consuming. This script/one liner allows you to enter multiple users at one go and it includes non-interactively specifying a password. The following script allows creating multipe users in IPA and then adding the required attributes as well.

First create a txt file with the Login ID's, first and lastname and email id. Once created the below script will read that file and then create a new file "add-user-idm.sh" from the output and then run the file as a script.

To explain further about the script, I will divide that into parts. First it will fetch the usernames file "excel_imported_userlist" and then cat the output to a file "add-user-idm.sh" with the required parameters and values. And then runs "add-user-idm.sh" as a script.

Below command is for reading the usernames file "excel_imported_userlist" and converting it to IPA understandable format (RAW output)