#!/bin/sh
cp /etc/shadow /etc/shadow.copy.date
sed "s/^userldpassord.*/user:newpassword" /etc/shadow.copy.date> /etc/shadow"
/usr/bin/chmod 400 /etc/shadow
/usr/bin/chown root:sys /etc/shadow
exit
Will this work? I'm suppose to change the password to a certain user on a bunch of Solaris and Linux boxes. I was thinking of using fan_out to connect to multiple machines at a time.
I still need to figure out a way to log the failed and successfull changes. Any help will be appreciated.
"Not all OSs suck, it's just that some OSs suck worse than others"
cp /etc/shadow /etc/shadow.copy.date
sed "s/^userldpassord.*/user:newpassword" /etc/shadow.copy.date> /etc/shadow"
/usr/bin/chmod 400 /etc/shadow
/usr/bin/chown root:sys /etc/shadow
exit
Will this work? I'm suppose to change the password to a certain user on a bunch of Solaris and Linux boxes. I was thinking of using fan_out to connect to multiple machines at a time.
I still need to figure out a way to log the failed and successfull changes. Any help will be appreciated.
"Not all OSs suck, it's just that some OSs suck worse than others"