Creating user accounts....
cousins at limpet.umeoce.maine.edu
Thu Feb 20 11:34:15 PST 2003
"RANGI, JAI" <JAI_RANGI at SDSTATE.EDU> wrote:
> Thanks for all of you for giving me the ideas for setting up a script for
> user accounts managements...
> Here is what I did and at this point of time it is working just fine ( Might
> not be very fancy for some of you) for our cluster......
> I created a script for password change like this
> passwd $1
> This will prompt for the new password and will update all the nodes....
> matchusers.sh script looks like this
> rcp /etc/group geonode1:/etc/group
> rcp /etc/passwd geonode1:/etc/passwd
> rcp /etc/shadow geonode1:/etc/shadow
> rcp /etc/group geonode2:/etc/group
> rcp /etc/passwd geonode2:/etc/passwd
> rcp /etc/shadow geonode2:/etc/shadow
> rcp /etc/group geonode3:/etc/group
> rcp /etc/passwd geonode3:/etc/passwd
> rcp /etc/shadow geonode3:/etc/shadow
> for all the nodes in cluster,
> Now if the password is changed for any user it being automatically updated
> on all the nodes.
The person who set up our cluster used rdist and an hourly cron job. In
the /etc/cron.hourly directory is a file called passwdupdate which
/usr/bin/rdist -f /etc/distfile > /dev/null
Then in /etc/distfile:
(/etc/passwd) -> root at node2 install /etc/passwd;
(/etc/shadow) -> root at node2 install /etc/shadow;
(/etc/gshadow) -> root at node2 install /etc/gshadow;
(/etc/group) -> root at node2 install /etc/group;
(/etc/passwd) -> root at node3 install /etc/passwd;
(/etc/shadow) -> root at node3 install /etc/shadow;
(/etc/gshadow) -> root at node3 install /etc/gshadow;
(/etc/group) -> root at node3 install /etc/group;
This takes out the risk of corrupting the files (as Donald pointed out).
You could just run your matchusers.sh script in a cron job but AFAIK rdist
only sends the file if it has changed.
Steve Cousins Email: cousins at umit.maine.edu
Research Associate Phone: (207) 581-4302
Ocean Modeling Group
School of Marine Sciences 208 Libby Hall
University of Maine Orono, Maine 04469
More information about the Beowulf