Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_domain_user CN name #44757

Closed
nicolaibaralmueller opened this issue Aug 28, 2018 · 9 comments
Closed

win_domain_user CN name #44757

nicolaibaralmueller opened this issue Aug 28, 2018 · 9 comments
Labels
affects_2.6 This issue/PR affects Ansible v2.6 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community

Comments

@nicolaibaralmueller
Copy link

SUMMARY

Module win_domain_user has no option to edit CN (Full Name).

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

win_domain_user

ANSIBLE VERSION
2.6.2
STEPS TO REPRODUCE
- name: Create User
  win_domain_user:
    domain_username: '{{ domain_username }}'
    domain_password: '{{ domain_password }}'
    domain_server: '{{ domain_server }}'
    name: '{{ username }}'
    upn: '{{ username }}@domain.com'
    firstname: '{{ firstname }}'
    surname: '{{ surname }}'
    password: '{{ password }}'
    password_expired: yes
    email: '{{ email }}'
    groups_action: add
    groups: "{{ usergroups }}"
    attributes:
      cn: '{{ firstname }} {{ surname }}'
      telephoneNumber: '{{ mobilenumber }}'
    state: present
EXPECTED RESULTS

User created with displayed full name (CN)

ACTUAL RESULTS
{
    "_ansible_parsed": true,
    "msg": "failed to change user testuser02: The attribute cannot be modified because it is owned by the system",
    "changed": true,
    "_ansible_no_log": false,
    "password_updated": true
}

User is created. But CN name is same as username.

image

@ansibot
Copy link
Contributor

ansibot commented Aug 28, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 28, 2018

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community labels Aug 28, 2018
@webknjaz webknjaz removed the needs_triage Needs a first human triage before being processed. label Aug 28, 2018
@jborean93
Copy link
Contributor

I'm not sure this is even possible, I was under the assumption that the Common-Name could only be set on creation and cannot be changed unless you delete and recreate the user. The module supports the path option which should be able to set this for you.

@nicolaibaralmueller
Copy link
Author

I'm not sure this is even possible, I was under the assumption that the Common-Name could only be set on creation and cannot be changed unless you delete and recreate the user. The module supports the path option which should be able to set this for you.

This is a creation of a user. The display name (CN) under active directory users and computers mmc just shows the username. When manualy creating a user the full displayed name can be edited.

@ansibot ansibot added support:core This issue/PR relates to code supported by the Ansible Engineering Team. and removed support:community This issue/PR relates to code supported by the Ansible community. labels Sep 22, 2018
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 8, 2018
@ansibot
Copy link
Contributor

ansibot commented Feb 17, 2019

cc @if-meaton
click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Apr 14, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Jun 1, 2019

@ghost
Copy link

ghost commented Jul 30, 2019

The issue is that system attributes cannot be changed like regular attributes are changed. In order to modify the CN/name of a user the Rename-ADObject command should be used. This means that those two additional attributes should be handled separately than the other additional attributes. Probably it would even make more sense to take them out as separate parameters of the win_domain_user module and handle their change with the above mentioned command.

By the way, there seems to be an alternative way of doing what you're trying to achieve as described in #45298. Unfortunately this other way is also not fully functional at the moment.

@nicolaibaralmueller
Copy link
Author

Closing since this seems to have no solution

@ansible ansible locked and limited conversation to collaborators Oct 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 feature This issue/PR relates to a feature request. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community
Projects
None yet
Development

No branches or pull requests

4 participants