Creating and removing a bulk of AIX users

I have 2 node HACMP clusters and need to create and remove a bulk of AIX users for the nodes frequently. It is very time consuming to through the list (~ 100 user account per week). Please let me know if we can create and remove AIX users with a script. One thing with the cluster environment is that the UID must be the same between 2 nodes when user accounts are created.

When creating AIX user accounts:

  • AIX user accounts will be defined in a .txt file
  • Make the UID same between 2 nodes
  • Assign the default password (i.e. changeme1234) to the accounts

Please advise.

Yes, why not. Feed the user list to a script with a loop reading in the parameters and hand them to useradd .
For the PWs use the same script and add a chpasswd .

Give it a try and show your code if you get stuck. The man pages explain clearly by examples how to use the two commands.