Problems creating a new user in Ubuntu

19,443

You are using wrong command. Use useradd instead of adduser:

sudo useradd -c 'uwsgi user,,,' -g nginx -d /nonexistent -s /bin/false uwsgi
Share:
19,443

Related videos on Youtube

John
Author by

John

Updated on September 18, 2022

Comments

  • John
    John over 1 year

    I am experimenting with nginx+uswgi+Flask and am following this tutorial. However when I get to the portion for creating a new user for uswgi I am having troubles.

    When I enter the command from the snippet the error I get is

    $ sudo adduser -c 'uwsgi user,,,' -g nginx -d /nonexistent -s /bin/false uwsgi
    Option g is ambiguous (gecos, gid, group)
    Option d is ambiguous (debug, disabled-login, disabled-password)
    Option s is ambiguous (shell, system)
    ...
    

    I am by no means a ubuntu pro but after doing a little research I think the options I want are

    $ sudo adduser -c 'uwsgi,,,' --group nginx --debug /nonexistent --system /bin/false uwsgi
    

    however the error this returns is:

    adduser: Only one or two names allowed.
    

    here is my version information (if that helps)

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 12.04 LTS
    Release:        12.04
    Codename:       precise
    

    So my question is what options should I be using to successfully create a uwsgi user such that I can complete the tutorial?

  • rainabba
    rainabba about 4 years
    root@774f50a9ad03:~# adduser --version adduser version 3.118 Adds a user or group to the system. Copyright (C) 1997, 1998, 1999 Guy Maor <[email protected]> Copyright (C) 1995 Ian Murdock <[email protected]>, Ted Hajek <[email protected]> linux.die.net/man/8/adduser