Occ user:add only password and uid arguments possible

Try to be concrete in your question! What doesn’t work, what are you trying to do and on what platform (distribution, versions etc), tools etcetera?

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

Scientific Linux 7.2, NextCloud 10.0.1 stable and 11alpha daily 2016-11-20

Wrote a bash script for automatic installation, installation w/o problems, user creation in GUI possible, user creation via OCC - as described in manual - is not possible:

export OC_PASS=edhootgegs
sudo -E -u apache php /var/www/html/nextcloud/occ user:add --password-from-env --display-name “Miguel Castano” --group “familie” ----group “admin” mc

[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments.

user:add [–password-from-env] [–display-name [DISPLAY-NAME]] [-g|–group [GROUP]] [–]

If I pass the password via environment and uid only as argument the user will be created.

Would be nice if this could be fixed. Thanks so much for your efforts!

omb

Did you try the syntax from the docs

export OC_PASS=newpassword
su -s /bin/sh apache -c 'php occ user:add --password-from-env
  --display-name="Fred Jones" --group="users" fred'

your second group uses three hyphens!

Thanks, tflidd, but the four hyphens appeared during editing. During test I removed one group after the next and even had to remove display-name. Users could be created only with password and uid.

Then report this directly on the bug-tracker: https://github.com/nextcloud/server/issues

SOLVED
found my solution, bash script error concerning double quotes in occ command.