Changing a password in indico 2

Is it possible for an administrator to change a user’s unknown password in indico2? Or is it possible for the user to request a reset link to be emailed to them? I know the latter used to be in indico1, but I can’t find it in indico 2.

Regards,

Chris

or course, just after I sent that I logged out and saw the reset link on the login page. I’m still curious if it is also possible for an admin to set a user’s password

Nope, it’s not possible (without knowing the user’s old password). It would actually make sense that an admin can change a user’s local password without having to enter the old one…

If you’re an admin you most likely have access to the Indico shell. Setting a new password is a one-liner.

Yeah, but it’s not super convenient, and it’ll end up in your ipython history unless you use something like raw_input() or getpass() to prompt it.

And we already have the page on account management where a user can change their own password. Wouldn’t it make sense to let an admin use that page as well, just without entering the old password? (after all, he can create a password for a user who doesn’t have one yet)

How do we activate the Indico shell?

run indico shell on the linux shell (while logged in via ssh to the indico user and having activated the virtualenv)

Got into the shell. What is the command to set a new password?

from getpass import getpass
u = User.get(123)  # replace 123 with the user's id
u.local_identity.password = getpass()  # enter the password when prompted for it
db.session.commit()
1 Like