#! /bin/bash ## Execute this as su from frontend. Supply the username for $user when prompted. The script add the user to the user group 'g09group' so that #the user can use Gaussian in the cluster if [ -d "/share/apps/g09/" ]; then read -p "Enter username whom you want to add as Gaussian user : " user ##### coc-sshreachable hosts=$(cat /share/tmp/ssh-reachable.dat | awk '{if ($1 != "192.168.1.10") print $1}') for i in $hosts do command="groupadd g09group ; groupmod -g 1108 g09group; usermod -a -G g09group $user" ssh -X -Y -oStrictHostKeyChecking=no $i "$command" done ##### fi