How to make a new user? #5

Closed
opened 4 years ago by manetta · 11 comments
Owner

Trying to make a new user for David, as he is doing a workshop with the students tomorrow.

Trying to make a new user for David, as he is doing a workshop with the students tomorrow.
Owner

Important : You need to know what port to assign...

So at the moment (could be greatly improved). Make a copy of the make_user_accounts.py script, and run it like:

python3 make_user_accounts --port $PORT --from-file usersnames.txt --passwords passwords.txt --addusers
*Important* : You need to know what port to assign... So at the moment (could be greatly improved). Make a copy of the make_user_accounts.py script, and run it like: ```python python3 make_user_accounts --port $PORT --from-file usersnames.txt --passwords passwords.txt --addusers ```
Poster
Owner

Nice!

I think i'm almost there.
The script ran fine, the user "david" is there, with a password.
Now i will check nginx if port 9070 is added, and if not, if after adding it to the conf it will work. Fingers crossed!

Nice! I think i'm almost there. The script ran fine, the user "david" is there, with a password. Now i will check nginx if port 9070 is added, and if not, if after adding it to the conf it will work. Fingers crossed!
Owner

OK, cool!

OK, cool!
Poster
Owner

It worked!

The last step was to copy the nginx settings of the new user to the configuration file there.

It worked! The last step was to copy the nginx settings of the new user to the configuration file there.
Poster
Owner

I ran the following command and this worked:

python3 make_user_accounts.py --port 9070 --from-file usernames.txt --passwords passwords.txt --addusers

However ... Port 9070 was already in use.
Looking now for the place where the Jupyter ports can be edited ...

I ran the following command and this worked: `python3 make_user_accounts.py --port 9070 --from-file usernames.txt --passwords passwords.txt --addusers` However ... Port 9070 was already in use. Looking now for the place where the Jupyter ports can be edited ...
Poster
Owner

Found it!

It was in: ~/.jupyter/jupyter_notebook_config.py

Found it! It was in: `~/.jupyter/jupyter_notebook_config.py `
Owner

Yes, indeed, so all good (just make sure they match in the nginx)

Yes, indeed, so all good (just make sure they match in the nginx)
Poster
Owner

Hmm, is there another file where the port needs to be changed?

I get a 404 now on the /__lab__/ page of the new user.

I tried to restart with sudo systemctl restart jupyterlab@USERNAME, but without success.

sudo systemctl status jupyterlab@* says that the instance is active ...

Hmm, is there another file where the port needs to be changed? I get a 404 now on the `/__lab__/` page of the new user. I tried to restart with `sudo systemctl restart jupyterlab@USERNAME`, but without success. `sudo systemctl status jupyterlab@*` says that the instance is `active` ...
Owner

oh yeah this is a silly bug that I did as well, you need to rename "sandbot" to "sandbox" in the .jupyter/jupyter_notebook_config.py :o

oh yeah this is a silly bug that I did as well, you need to rename "sandbot" to "sandbox" in the .jupyter/jupyter_notebook_config.py :o
Owner

TODO: Add a variables for the servername / url in the make script + adjust templates to use them!: Created #6

TODO: Add a variables for the servername / url in the make script + adjust templates to use them!: Created #6
Poster
Owner

Ahhh! Oke that is an important detail :---).

Will change it now and see if it works.

Ahhh! Oke that is an important detail :---). Will change it now and see if it works.
manetta closed this issue 4 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: XPUB/jupyterpi#5
Loading…
There is no content yet.