Creating and removing a bulk of AIX users | Unix Linux Forums | Shell Programming and Scripting

  Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Creating and removing a bulk of AIX users

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 07-10-2013
Daniel Gate Daniel Gate is offline
Registered User
 
Join Date: May 2008
Last Activity: 11 February 2015, 8:07 AM EST
Posts: 225
Thanks: 84
Thanked 0 Times in 0 Posts
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.

Last edited by Daniel Gate; 07-10-2013 at 05:34 AM..
Sponsored Links
    #2  
Old Unix and Linux 07-10-2013
zaxxon's Unix or Linux Image
zaxxon zaxxon is offline Forum Staff  
code tag tagger
 
Join Date: Sep 2007
Last Activity: 1 April 2015, 3:07 AM EDT
Location: St. Gallen, Switzerland
Posts: 6,266
Thanks: 128
Thanked 456 Times in 415 Posts
Quote:
Please let me know if we can create and remove AIX users with a script.
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.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Creating Header & Trailer for bulk volume data file Raamc Shell Programming and Scripting 4 05-16-2010 09:53 AM
Removing users from groups the_red_dove Solaris 11 10-29-2009 12:36 AM
creating users vishwaraj HP-UX 1 01-14-2008 07:30 AM
Creating Users with SMC chaandana UNIX for Advanced & Expert Users 2 06-26-2007 01:45 AM
Creating Users!!!! ocpguy UNIX for Dummies Questions & Answers 1 12-04-2001 02:39 PM



All times are GMT -4. The time now is 12:25 AM.