diff --git a/reset_jupyter_password.py b/reset_jupyter_password.py index 27ce82d..71c5343 100644 --- a/reset_jupyter_password.py +++ b/reset_jupyter_password.py @@ -1,5 +1,6 @@ import os -from IPython.lib import passwd +# from IPython.lib import passwd +from hashlib import sha1 from jinja2 import Environment, FileSystemLoader from random import shuffle @@ -21,7 +22,8 @@ password = "".join(passwords[:3]) userdata = {} userdata['username'] = username userdata['password'] = password -userdata['password_sha1'] = passwd(password) +# userdata['password_sha1'] = passwd(password) +userdata['password_sha1'] = sha1(password.encode("utf-8")) userdata['port'] = port userdata['servername'] = servername