Code:
#!/bin/bash
if [ $# -lt 1 ]; then
echo Description:
echo "Modifies /etc/group to add specified group to 'normal' users."
echo "You must redirect output back into /etc/group if you're satisfied"
echo "with the results."
echo
echo "Usage: $0 [ group ]"
echo
echo
exit
fi
sed "s/:\(5[0-9]\{2\}\):/:\1:$1,/; s/,,/,/g; s/,$//g" /etc/group.new
Sorry I'm not going to do everything for you.
Use the 'groupadd' command to add the group you want. Type 'man groupadd' to figure out how to use it.
To add that new group to all 'normal users', run '<script> NewGroup'. If you like the output, make a backup copy of /etc/group and copy /etc/group.new over /etc/group.
Feel free to ask me about the regular expression used to find the normal users in the group file (if you're interested) and I'll try and explain.