I need create a user with the option --disabled-login with ansible's playbook.

The command line is:

sudo adduser --disabled-login git

I'm searching on Ansible's documentation. And the option system is similar.

The playbook task is:

user: name=git system=no

Is the option system=no the same as the option --disabled-login?

1 Answer 1


No, system=no is not the same as --disabled-login!
From the adduser man-page:

Do not run passwd to set the password. The user won't be able to use her account until the password is set.

So when using Ansible's user module, and you do not set a password, the login is disabled anyway (unless SSH-keys are being setup in the account's $HOME).

  • 3
    Depending on your configuration, even if SSH keys are setup you may not be able to login in such an account. This is for example the default in Debian. Nov 15, 2013 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.