#!/bin/bash
for host in $(cat /path/to/hosts.txt)
do
ssh root@$host "usermod -c 'Some text' username"
done
ASKER
Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.
TRUSTED BY
Open in new window
This is not complete. You will have to follow this logic and have to test at each step because it is hard to program it without having your complete setup.
Follow examples like
http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/scripting/5.html
http://www.thegeekstuff.com/2010/10/expect-examples/