[Spacewalk-list] change root password for all machines in a group

Jeffrey Watts jeffrey.w.watts at gmail.com
Wed Feb 3 17:03:02 UTC 2010


I think he means /etc/shadow.  There are several approaches, one would be to
script the 'passwd' command, using expect or something like it.  The
downside is that you'll need to have the password in plain text in the
script.  You could then use Spacewalk to run the script remotely.  This is
probably what I'd do, but make sure you test it thoroughly first, as if you
screw it up you might make your systems inaccessible.

Another option would be to copy the password hash from a system where you've
set that password, and then write a script to edit /etc/shadow on a target
system and replace the old string with the new one.

Finally, if your systems are all homogeneous, you can simply push out a new
shadow file with the updated hash.  Most people won't be in this situation.

Jeffrey.

On Wed, Feb 3, 2010 at 10:51 AM, Edwind Richzendy Contreras Soto <
richzendy at gmail.com> wrote:

> 2010/2/4 Michiel van Es <michiele at info.nl>:
> > Hi,
> >
> > Is it possible to change the root password on all machines in a group?
> > We want to change the root password for al lot of systems, we thought
> > perhaps is spacewalk of some use (since you can install packages, reboot
> the
> > machines)
> >
> > Is such an option possible through spacewalk?
> >
> > Kind regards,
> >
> > Michiel
>
> if it generates a new file / etc / passwd and charges through the area
> concerning configuration files (perhaps your user role does not allow
> you to do this) and only select group of systems the option to work
> with group and send him to send the configuration file to all
> computers SSM.
>
> Another option is through a small script using sed-i editing the file
> / etc / passwd directly on each machine together (SSM).
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20100203/e19e4870/attachment.htm>


More information about the Spacewalk-list mailing list