Q&A: How can I force users to change passwords after importing?

Question

How can I force users to change passwords after importing?

Environment

You are importing users through the Importer (Web-UI oder command line).
You want to make sure the users have to change it’s password when logging in the next time.

Answer

Option 1

Just accept the password the Importer can generate. They are randomly generated and can not be guessed. Check the documentation to enable the password generation.

Option 2

Use a Python hook to do this.
Note: As this is Python program code you should be familiar to Python. At least: You should know what you are doing!
Download the attached file and uncompress it with gzip -d to the folder /usr/share/ucs-school-import/pyhooks/
If done ALL imported users have to change their password at the next login.
Python Hook:
pwdChangeNextLogin.py.gz (1011 Bytes)

1 Like
Mastodon