Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 2 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
    
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.