adduser: Specify only one name in this mode
13,974
Option --group
doesn't support any arguments unless you intend to create the given group. But it seems like you cannot add a new user and a (different) new group at the same time.
What are you trying to do? Are you looking for option --ingroup
instead? Otherwise you have to create the group first. Then run adduser
a second time to add a new user to the existing group.
Author by
Paul Smith
Updated on September 18, 2022Comments
-
Paul Smith over 1 year
I'm trying to add a user with this command on my debian server:
#!/bin/bash APPUSER="test1" APPGROUP="test2" # User adduser -c 'uwsgi user' --group $APPGROUP --system --no-create-home --disabled-login --disabled-password $APPUSER
However it tells me I can only specify one name, but I am only specifying one name as far as I can see.
What's going wrong?
-
Admin about 10 yearsWhat's your OS?
adduser
varies by OS and even distro. -
Admin about 10 yearsI should have noticed the Debian tag.
-
Admin about 10 yearsTry running the script using
set -x
. It should show you the complete command that gets run.
-