1834178 Members
2347 Online
110064 Solutions
New Discussion

Common Function Scripts

 
Janet Abel
Occasional Contributor

Common Function Scripts

Does anyone have "standard" scripts for common functions like changing root password and modifying cron (for reboots) over multiple systems?
2 REPLIES 2
Vincenzo Restuccia
Honored Contributor

Re: Common Function Scripts

See man modprpw(1).
Volker Borowski
Honored Contributor

Re: Common Function Scripts

Hi,
I use a script which I call dsh (distributed sh). It requires .netrc to be set up correctly for all hosts and rexecd permitted on inetd.conf for all targets.

In addition it requires some testing if you like to play around with "< > | \" and so on.
But for simple jobs, this works ok.

HOSTS="host01 host02 host03 host04"
for name in $HOSTS
do
echo '================================='
rexec $name $* | awk -v HOSTID=$name '{ print HOSTID " : " $0 }'
done
echo '================================='

Sample:

# dsh date
===============================================
host01 : Tue May 15 19:31:31 CEST 2001
===============================================
host02 : Tue May 15 19:32:08 CEST 2001
===============================================
host03 : Tue May 15 19:23:18 CEST 2001
===============================================
host04 : Tue May 15 19:23:26 CEST 2001
===============================================
#

hoops, I think I need to adjust the clocks...

Volker