I’ve installed owncloud 10.8.0.4 on OVH VPS.
I try to import users from a csv file. I wrote a shell script for that. I would like to import users with only email (no password) so that an email is sent to them for creating their password.
According to documentation :
A password is not required , if an email address is provided. If a password is not provided, a temporary one will be generated. It cannot be set to 0 .
As a workaround you could create a user with a random password, generate a password recovery link and send this in a custom email to your user, I.e.
$ export OC_PASS=verysecurepassword; sudo -E -u www-data php occ user:add --password-from-env --email firstname.lastname@example.org exampleuser
The user "exampleuser" was created successfully
Email address set to "email@example.com"
$ sudo -u www-data php occ user:resetpassword --output-link exampleuser
The password reset link is: http://owncloud/index.php/lostpassword/reset/form/3C7ifE8m7edEQ82bKPAU2/exampleuser
I was aware about the send-email switch as well but your users might get confused when they receive a password reset email. So I offered the variant where you retrieve the link only which you could embed in a proper template.