Help new to Nextcloud import users from list

Hello everybody,

I am pretty new to Nextcloud .
I looking to find a way to import users from csv or excel file.

I am using nextcloud on hosting server .

thanks in advance.

Afaik such a function doesn’t exist in the GUI, but you can e.g. create a bash script and use the command line tool to do the job:

> ./occ user:add --help
Usage:
  user:add [options] [--] <uid>

Arguments:
  uid                                User ID used to login (must only contain a-z, A-Z, 0-9, -, _ and @)

Options:
      --password-from-env            read password from environment variable OC_PASS
      --display-name[=DISPLAY-NAME]  User name used in the web UI (can contain any characters)
  -g, --group[=GROUP]                groups the user should be added to (The group will be created if it does not exist) (multiple values allowed)
  -h, --help                         Display this help message
  -q, --quiet                        Do not output any message
  -V, --version                      Display this application version
      --ansi                         Force ANSI output
      --no-ansi                      Disable ANSI output
  -n, --no-interaction               Do not ask any interactive question
      --no-warnings                  Skip global warnings, show command output only
  -v|vv|vvv, --verbose               Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Maybe this script works for you?

Hello I tried to launch nc-userimporter on linux ubuntu 20.04 but i get this issue :
Traceback (most recent call last):
File “nc-userimporter.py”, line 324, in
File “/usr/lib/python3.5/codecs.py”, line 321, in decode
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe9 in position 164: invalid continuation byte
[149957] Failed to execute script nc-userimporter

Most likely your csv files isn’t encoded correctly or characters in different encodings are used. Make sure that it is saved in utf-8 format. See also:

Thanks a lot, I’ll have a look on it !

It seems to work better but for the moment I have a self-signed certificate and the operation of user creation stopped because of it, I think !!

[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
The CURL request could not be performed.
Press [ANY KEY] to confirm and end the process.