Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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

--disabled-login
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).

share|improve this answer
1  
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. – Nicolas Dudebout Nov 15 '13 at 23:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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