On Sun, 29 Oct 2006 19:15:56 +0100, "Ingo Schwarze" <[EMAIL PROTECTED]>
said:
> On first sight, an additional option "remove from group" to usermod(8)
> might not hurt much.  As a second thought, how would you call it, -g
> and -G are already occupied; yet it is important for learners to
> have option names as few and as mnemonic as possible, and please lets
> not get into --remove-from-group.  As a third thought, what might be
> the next special case that somebody could come up with for plausible
> reasons?  And finally, once you add an option, you have to live with
> it for good, as somebody will certainly rely on it.

instead of usermod -G group; to add to group. you could
usermod -G - group; to remove from group
just a thought...

but as has been pointed out, it is trivial to write a script
that would automatically go out and modify /etc/group
on even a large number of boxes.

This is rough, needs polishing, use at own risk, blah blah...

BOXES="server1 server 2 server3. . ."

for box in $BOXES
do
  { sleep 5;echo "username";sleep 2;echo "password";sleep 2;
echo"sudo do some command left as exercise for reader";
sleep 3;echo "exit"; } |telnet $box 2>>/tmp/rcmd.error 1>/dev/null
done

Reply via email to