Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set admin password during install #395

Merged
merged 6 commits into from Jan 29, 2020

Conversation

GeorgianaElena
Copy link
Member

@GeorgianaElena GeorgianaElena commented Jul 10, 2019

Added the option to set the admin user password during install (closes #263).

If the installer is called with --password option, then a password will be requested for each admin user specified with --admin*. If --password is not present, the script will behave like before.

@yuvipanda, can you please give me some advice about how/if should I test this? 馃憖

@GeorgianaElena
Copy link
Member Author

@yuvipanda, according to the docs, in order to add multiple admins during install there should be something like: --admin a1 --admin a2.
This didn't work for me (it only stored the last one). Doing instead --admin a1 a2 works.
From argparse's docs it looks like there should be an action="append" in order to be able to use --admin multiple times.

@yuvipanda
Copy link
Collaborator

w00t, thanks for working on this, @GeorgianaElena!

  1. I think we should ask users for passwords in the form '--admin username:password --admin username:password', so we can match usernames to passwords easily. This re-uses how HTTP does basic auth usernames / passwords for syntax...
  2. whoops re: append. Would love a PR for that.

What do you think?

@GeorgianaElena
Copy link
Member Author

Thanks for the feedback @yuvipanda :D
I will open a PR to add the append.
I chose not to have --admin:password because I feared that the password will be stored along with the install command in bash history and I think it is also visible when doing ps while the script is running.
But I totally agree it is not ideal to have the installer request user input and if the concern above is not applicable here, I'm more then happy to have it as you suggested.

@GeorgianaElena
Copy link
Member Author

@yuvipanda, I've addressed your feedback, added tests and updated the docs. Let me know what you think :)

@GeorgianaElena GeorgianaElena changed the title [WIP] Set admin password during install Set admin password during install Jul 26, 2019
@yuvipanda yuvipanda merged commit 18eda64 into jupyterhub:master Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting admin user password during install command
2 participants