Cannot create user

3 views
Skip to first unread message

Werner Flamme

unread,
Apr 13, 2018, 10:18:22 AM4/13/18
to Ansible Project
Hi,

can someone please show me what's wrong?

- name: create one single user
user:
user: "someguy"
password: "something secret here"
group: "users"
state: "present"

does not create a user, but invokes usermod instead of useradd. Of
course, I get a message telling me that the user does not exist in
/etc/passwd. This is very correct.

Using no quotation marks around present or leaving them away completely
does not help.

I'm running ansible 2.5.0 on python version = 2.7.13.

Regards,
Werner

--



Werner Flamme

unread,
Apr 13, 2018, 10:30:27 AM4/13/18
to ansible...@googlegroups.com
Werner Flamme [13.04.2018 16:18]:
First solution: use shorter user name. It works when "someguy" is
replaced with "exer". Originally, we use an 8 character user name.

Unfortunately, the usernames are not designed by me... I have to use
usernames with up to 8 characters.

Regards,
Werner

--


Werner Flamme

unread,
Apr 13, 2018, 10:56:33 AM4/13/18
to ansible...@googlegroups.com
Werner Flamme [13.04.2018 16:30]:
Note to self: Do not try to create a user locally that is available via
LDAP when the system has a LDAP login... *cough*

Thanks for looking.

Werner
--


Reply all
Reply to author
Forward
0 new messages