module win_user

130 views
Skip to first unread message

e.bar...@404-group.com

unread,
Sep 8, 2015, 9:34:19 AM9/8/15
to Ansible Project
Hi.
We have a vm ubuntu 14.04 LTS with ansible 1.9.3 and python 2.7.
I want to create users on a machine with windows.
Using module winrm on windows and win_user module for creating profile. (Testing in o.s.: windows 7, windows 8/8.1)

My playbook:
---
- name: Add a user
  hosts: all
  tasks:
   - name: Add user in system
        win_user:
        name: test
        password: "password"
        groups: ["users"]
        state: present

run playbook:
ansible-playbook -vvvv -i hosts playbooks/users.yml

result:
changed: [192.168.1.171] => {"account_disabled": false, "account_locked": false, "changed": true, "description": "", "fullname": "test", "groups": [{"name": "users", "path": "WinNT://WORKGROUP/mycomp/users"}], "name": "test", "password_expired": false, "password_never_expires": true, "path": "WinNT://WORKGROUP/mycomp/test", "sid": "S-1-5-21-2925825274-3949947971-3441621627-1016", "state": "present", "user_cannot_change_password": false}
```
In windows system user is created, and I see this in: managing computer >  users. But in logon window user does not appear.
Why ? Help me please

Trond Hindenes

unread,
Sep 8, 2015, 10:14:00 AM9/8/15
to Ansible Project
I don't understand the question. Can you log on with the created user by typing in the username?

Matt Martz

unread,
Sep 8, 2015, 10:26:42 AM9/8/15
to ansible...@googlegroups.com
IIRC, this has something to do with not being placed in any groups by default, specifically the one needed to show up on the login screen.  I don't remember what it is, but logins should still be allowed.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2f269954-843a-4c3b-973e-fbdb80a56b9f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Matt Martz
@sivel
sivel.net

Chris Church

unread,
Sep 9, 2015, 3:28:31 PM9/9/15
to ansible...@googlegroups.com
I can't seem to reproduce with either 1.9.3 or devel against a Windows 2008 Server instance.  Adding a user to the Users or Administrators group is enough for it to show up in my case.

Reply all
Reply to author
Forward
0 new messages