Issue Bug Closed

#105878Running bin/typo3 backend:user:create admin or maintainer options cannot be negated

Lina Wolf 01/03/25, 11:29 updated 01/04/25, 09:03

Description

if you run Running bin/typo3 backend:user:create —admin=n

You get `The “—admin” option does not accept a value. `

However the standard symfony negation

bin/typo3 backend:user:create —no-admin

does also not work.

Therefore it is not possible to run the command to explicitly create a non-admin without interaction

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 6

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-01-03T13:08:49+00:00" > 01/03/25, 13:08 </span>

    This works for me:

    ./vendor/bin/typo3 backend:user:create —username=somebody —password=SomePassWord-123 —email=someone@example.com —no-interaction

    Because “—admin” and “—maintainer” are activated flags, simply not specifying them disables them.

    Could you maybe elaborate? Maybe using the ENV vars “TYPO3_BE_USER_ADMIN=0 TYPO3_BE_USER_MAINTAINER=0” could also help you

  2. Lina Wolf commented <span data-processor="relativetime" data-value="2025-01-04T08:09:34+00:00" > 01/04/25, 08:09 </span>

    Not setting —admin and —maintainer leads to the user beeing prompted. What I want is an explicit no for these options.

    I can then create a command where the user is prompted for a password but not asked weather he wants to be an admin.

    Using Input option `InputOption::VALUE_NEGATABLE` instead of `InputOption::VALUE_NONE` could achieve this.

  3. Lina Wolf commented <span data-processor="relativetime" data-value="2025-01-04T09:03:01+00:00" > 01/04/25, 09:03 </span>

    It can indeed be solved by using the no interaction option combined with not setting these flags:

    typo3 backend:user:create --username=e.doe --groups=1 --email=e.doe@example.org --no-interaction