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 .
So it’s not possible to create users with only email (no password) with occ and then an invitation email is sent to them to choose their password ?
We must use web interface for this scenario ?
after having reviewed the code I can confirm this option is not possible with the occ command. You may open a feature request at https://github.com/owncloud/core/issues/
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 exampleuser@example.com exampleuser
The user "exampleuser" was created successfully
Email address set to "exampleuser@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.