|
|
|
|
@ -251,7 +251,7 @@ function add_user {
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
sudo mkdir -p /mnt/data/$1
|
|
|
|
|
sudo mkdir -p /mnt/data/home
|
|
|
|
|
sudo adduser --home=/mnt/data/home/$1 $1
|
|
|
|
|
|
|
|
|
|
# We obtain the UID of the new user, as the last line at the end
|
|
|
|
|
@ -287,12 +287,12 @@ function del_user {
|
|
|
|
|
sudo userdel -f $1
|
|
|
|
|
|
|
|
|
|
for h in ${cluster_hosts}; do
|
|
|
|
|
echo -n "Creating the user $1 on $h ... "
|
|
|
|
|
echo -n "Deleting the user $1 on $h ... "
|
|
|
|
|
ssh root@${h} userdel -f $1
|
|
|
|
|
echo "done"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
echo "Note: the home directory /data/home/$1 has been preserved,"
|
|
|
|
|
echo "Note: the home directory /mnt/data/home/$1 has been preserved,"
|
|
|
|
|
echo " you may wish to delete that as well."
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -307,4 +307,4 @@ if [ "$1" == "--delete" ]; then
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
help
|
|
|
|
|
```
|
|
|
|
|
```
|