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
here is the shell script i wrote :
#!/bin/bash while IFS=, read -r username displayname email group1 group2 do echo "création de l'utilisateur $username avec l'email $email displayname $displayname group1 $group1 group2 $group2" sudo -u www-data php /var/www/owncloud/occ user:add --display-name "$displayname" --email $email --group "$group1" --group "$group2" $username done < users.csv
- execute script : sh ./script.sh
users should be created
password is asked for user
Operating system: Debian 10
Web server: apache 2
PHP version: 7.4.24
ownCloud version: 10.8.0.4