notebook
notebook copied to clipboard
Issue in Following Password Setup
I followed this
Instead of getting something similar to the following as shown in the tutorial
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
I am getting something like the following
'argon2:<something-here>'
I cannot log in to my notebook, and the terminal trace doesn't give the token.
And also, jupyter notebook list
is not showing the token.
How to resolve this issue?
I am trying to remotely connect to a Jupyter server.
Hi,
I am getting something like the following
'argon2:<something-here>'
Where and when are you seeing this and what is the nature of <something-here>
?
Did you write the sha
back into the jupyter_notebook_config.py
file and ensure that jupyter_notebook_config.json
doesn't already contain a password per the docs?
I cannot log in to my notebook, and the terminal trace doesn't give the token.
When a password is configured, the log messages will not contain a token.
Have you tried configuring the password using jupyter notebook password
- which will automatically adjust the JSON configuration file (and takes precedence)?
I also have the issue.
EDIT: This was from the wrong environment. Also I only saw this happen in windows, for some reason.
I also found a workaround, which is to use SHA1 instead of argon2. I am not entirely sure, but there might be problem with how jupyter utilize argon2.
In [1]: from notebook.auth import passwd
In [2]: passwd(algorithm='sha1')
Same here.
Signature: passwd(passphrase=None, algorithm='argon2') Docstring: Generate hashed password and salt for use in notebook configuration.
In the notebook configuration, set
c.NotebookApp.password
to the generated string.Parameters
passphrase : str Password to hash. If unspecified, the user is asked to input and verify a password. algorithm : str Hashing algorithm to use (e.g, 'sha1' or any argument supported by :func:
hashlib.new
, or 'argon2').Returns
hashed_passphrase : str Hashed password, in the format 'hash_algorithm:salt:passphrase_hash'.
Examples
passwd('mypassword') 'sha1:7cf3:b7d6da294ea9592a9480c8f52e63cd42cfb9dd12' File: /opt/conda/lib/python3.9/site-packages/notebook/auth/security.py Type: function
The default algorithm must had changed...
this jupyter argon2 password thing is a serious headache, if something does not work why release it?!? it jupyter can not work with argon2 without wasting several hours figuring out what is wrong, then why not just keep the thing using sha1 still?!?
the argon2 always say invalid hash, what is fix to this?!?
hey so I had this similar issue, and since I am new to programming and all this I've been trying to figure it out for about 20 hours now. So I don't what happened but there was one instance where using the 'jupyter server password' to update did work. However since I was attempting a weak password for testing purpose when I re did the the 'jupyter server password' to now put a strong password. It is not working. I've changed the config.py probably around 100 times by now (not kidding).
did this get solved?
so for anyone wanting to find a workaround.
step 1. comment out the command #c.NotebookApp.password = 'argon2......' step.2 go to your URL i.e. jupyterpizza.com, in my case https://jupyterpizza.com/. then use the token login, for those who are new like myself, i.e copy paste only the token numbers i.e 8dbf7248c98b03db5330ce7f05ea00a7dd0b5481af631894 in the below box where it says 'Token' and 'new password' (set up your new password here.) that will allow you to set up a password. step3 celebrate! go do something fun you are learning and it can be tough. -this comment written Nov 29 2023 8:24am