Q&A: Can I trigger to send the password reset email for a user (again) from the commandline?

Question

As an administrator, I need to trigger the password reset email for a certain user. Can I do this?

Answer

There is no dedicated CLI tool or command to do this. However, you should be able to use a curl command to send the request to the webservice.

This should work, just replace the FQDN and the username:

curl 'https://<fqdn-of-your-server-with-the-self-service>/univention/command/passwordreset/send_token' \ 
 -H 'Content-Type: application/json' \
 --data-raw '{"options":{"username":"michael","method":"email"}}'

Hint: This seems to be a good place to also mention that you can (and most probably should) configure a rate limit for these password resets. See the UCR variables umc/self-service/passwordreset/limit/* for details.

1 Like

This topic was automatically closed after 60 minutes. New replies are no longer allowed.

Mastodon