notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Issue in Following Password Setup

Open vibhatha opened this issue 4 years ago • 7 comments

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.

vibhatha avatar Oct 15 '20 12:10 vibhatha

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)?

kevin-bates avatar Oct 15 '20 15:10 kevin-bates

I also have the issue.

EDIT: This was from the wrong environment. Also I only saw this happen in windows, for some reason.

I started seeing the problem after running following update from anaconda ``` jupyter_server 1.2.1-py38h578d9bd_0 --> 1.2.2-py38h578d9bd_0 jupyterlab 3.0.3-pyhd8ed1ab_0 --> 3.0.5-pyhd8ed1ab_0 jupyterlab_server 2.1.1-pyhd8ed1ab_0 --> 2.1.2-pyhd8ed1ab_0 ```

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')

rtfcv avatar Jan 16 '21 01:01 rtfcv

Same here.

ksunw0209 avatar Mar 18 '21 00:03 ksunw0209

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...

RaoTianlong avatar Feb 17 '22 10:02 RaoTianlong

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?!?

encryptblockr avatar Aug 09 '23 05:08 encryptblockr

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?

jm9151821 avatar Nov 29 '23 13:11 jm9151821

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

jm9151821 avatar Nov 29 '23 14:11 jm9151821