0

I am trying to write a script to manage users and grant privileges to a group administrator. I saw in the occ group commands that you can create groups and manipulate users on a group. But I have not seen any command to add a group admin.

jmoerdyk
  • 5,544
  • 7
  • 38
  • 49
Matheo
  • 5
  • 1
  • 6

1 Answers1

1
  • create user:

    sudo -u www-data php occ user:adduser --display-name="USER_NAME" --group="admin" USER_NAME

  • check:

    sudo -u www-data php occ user:info USER_NAME

  • more details:

    sudo -u www-data php occ

jmoerdyk
  • 5,544
  • 7
  • 38
  • 49
amarz
  • 11
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 10 '22 at 22:31
  • 1
    In the latest version of Nextcloud as of today, the first command will have to change to something like: `php occ group:adduser admin admin`. You can also do: `php occ group:adduser --help` for help on a given command. – ketan vijayvargiya Nov 24 '22 at 08:02