Skip to content
Snippets Groups Projects
Verified Commit 17628183 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

create_users_from_mail.sh: improve account creation script (no badname error and shorted pwd)

parent 69b4f696
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
## Session 1
- add tuto on how to connect to the Rstudio server hosted at the IFB
## All sessions
- Write summary of all the commands at the end (what should have been written in the .R file during the session)
......
......@@ -7,9 +7,9 @@ USERMAILS=$@
for USERMAIL in ${USERMAILS[@]}
do
USERNAME=$(echo ${USERMAIL} | sed -E 's/(.*)@.*/\1/')
adduser ${USERNAME} --gecos 'First Last,RoomNumber,WorkPhone,HomePhone' --disabled-password
adduser ${USERNAME} --gecos 'First Last,RoomNumber,WorkPhone,HomePhone' --disabled-password --force-badname > /dev/null
PASSWD=$(openssl rand -base64 10)
echo "${USERNAME}:${PASSWD}" | chpasswd
echo "${USERNAME}:${PASSWD}" | chpasswd > /dev/null
echo "======================================================================="
echo "${USERMAIL}:"
echo "${USERNAME}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment