mirror of
https://github.com/balkian/jupyterhub-oauth.git
synced 2025-07-05 15:02:22 +00:00
18 lines
416 B
Bash
18 lines
416 B
Bash
#!/bin/sh
|
|
|
|
IFS="
|
|
"
|
|
for line in `cat userlist`; do
|
|
test -z "$line" && continue
|
|
user=`echo $line | cut -f 1 -d' '`
|
|
admin=`echo $line | cut -f 2 -d' '`
|
|
echo "adding user $user"
|
|
useradd -m -s /bin/bash $user
|
|
if [ "$admin" = "admin" ]; then
|
|
echo "Making $user admin"
|
|
usermod -a -G hubadmin $user
|
|
fi
|
|
#cp -r /srv/ipython/examples /shared/$user/examples
|
|
#chown -R $user /home/$user/examples
|
|
done
|