t-markmann / nc-userimporter

This tool creates Nextcloud users from a CSV file, which you exported from some other software or created with a spreadsheet software. To disable/enable/delete users, try: https://github.com/t-markmann/nc-usermanager
GNU General Public License v3.0
64 stars 22 forks source link

Configuration option `generatepassword` does not work as expected #47

Open wtimme opened 1 year ago

wtimme commented 1 year ago

First of all: Thanks a lot for your work! This script has saved countless hours of adding users to our Nextcloud instance. 👍

We use the generatepassword configuration option (which is set to yes by default). Its documentation reads:

Select yes if you want a password to be generated automatically if no password is specified in user-csv-file.

However, the script was not creating passwords, but pointed out that the passwords from the users-csv-file did not have the proper length.

Upon closer inspection, we noticed these two lines:

  if not config_GeneratePassword == 'yes':
    print ("ATTENTION: You have specified that users for whom no password has been entered will receive an e-mail to set a password for themselves. [...]")

Finally, we were able to achieve the desired functionality by setting the configuration option to something other than yes.

Shouldn't the line 344 omit the not part?

Again, thanks for your effort! It's highly appreciated.