nc-userimporter icon indicating copy to clipboard operation
nc-userimporter copied to clipboard

[SOLVED] Its possible to import with blank password and without welcome message?

Open konfib opened this issue 1 year ago • 5 comments

Hi, I could not figure out how to do that: import without password and without welcome message? How to configure the "config.xml" file? If NO: an e-mail will be sent. (is not wanted) <generatepassword>no</generatepassword> <!-- Select yes if you want a password to be generated automatically if no password is specified in user-csv-file. Select no if you want an e-mail to be sent to the user instead with a request to enter a password. In this case a correct e-mail address MUST be entered in the user-csv-file. -->

If YES: a password will be generated . (is not wanted) <generatepassword>no</generatepassword> <!-- Select yes if you want a password to be generated automatically if no password is specified in user-csv-file. Select no if you want an e-mail to be sent to the user instead with a request to enter a password. In this case a correct e-mail address MUST be entered in the user-csv-file. -->

Thanks for answer.

konfib avatar Nov 24 '23 23:11 konfib

Hello, that is impossible by design. I think even in the Nextcloud API. Reason: somehow the user has to get a password. You can't create an account without password.

What are you trying to achieve? Maybe there is a workaround.

Easiest way that is almost like "no password": just fill your .csv file with dummy-passwords.

t-markmann avatar Nov 25 '23 07:11 t-markmann

I see, solution would be a .csv file with dummy-passwords.

But manually it is possible by design. Under: /settings/users it has a checkbox to disable the mail notification for new created users. And at same time its possible to not set a password, while creating a new user, without the mail notification.

The purpose is, to create users and manually send them an invitation mail and let them set an own password, by password reset.

konfib avatar Nov 25 '23 11:11 konfib

I think we got a misunderstanding here. My point was that you can not create a user without password and without mail. Re-reading your posts I now understand that you wanted something else and the description in the config.xml might be misleading.

If you uncheck the "send mail to new users" box in the settings in /settings/user this should be respected in the creation via script/api. Could you check that please and report back? I would correct the description then.

t-markmann avatar Nov 25 '23 12:11 t-markmann

[SOLVED] Yes you're right! my-nc.example.com/index.php/settings/users If "send mail to new users" is unchecked, it's possible to import via csv even without dummy-password and no Welcome Mail is sent. (it was another test Nextcloud, were I forgot this User setting!)

konfib avatar Nov 25 '23 13:11 konfib

If this is solved, the issue should be closed

skranz0 avatar Apr 12 '24 09:04 skranz0

Added this case to description of config.xml https://github.com/t-markmann/nc-userimporter/commit/dd34d58967d7fba24c2613b92cf35042f442bb77

t-markmann avatar May 16 '24 07:05 t-markmann