Skip to content

Commit

Permalink
add mgbid
Browse files Browse the repository at this point in the history
  • Loading branch information
dmd committed Sep 20, 2023
1 parent 0407124 commit 0c19777
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cluster-user-add
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi

if [ $# -ne 2 ]
if [ $# -ne 3 ]
then
echo "Usage: $0 newusername emailaddress"
echo "Usage: $0 newusername emailaddress MGBID"
exit 1
fi

U=$1
E=$2
M=$3

/cm/local/apps/cmd/bin/cmsh -c "user; add ${U}; set loginshell /bin/tcsh; set email $E ; set password; commit;"
/cm/local/apps/cmd/bin/cmsh -c "user; add ${U}; set loginshell /bin/tcsh; set email $E ; set surname $M ; set password; commit;"
chown -R $U:$U /home/$U

cp /home/proto/.cshrc /home/proto/.cshrc.local /home/$U
Expand Down

0 comments on commit 0c19777

Please sign in to comment.