Jira (PUP-10219) Unable to create local user when username already exists in Windows domain

13 views
Skip to first unread message

Gabriel Nagy (JIRA)

unread,
Jan 7, 2020, 7:37:03 AM1/7/20
to puppe...@googlegroups.com
Gabriel Nagy moved an issue
 
Puppet / Bug PUP-10219
Unable to create local user when username already exists in Windows domain
Change By: Gabriel Nagy
Affects Version/s: puppet-agent 6.3.0
Key: PA PUP - 3063 10219
Project: Puppet Agent
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jan 7, 2020, 9:14:03 AM1/7/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10219
 
Re: Unable to create local user when username already exists in Windows domain

Nit, in ruby it's preferable to use sid.domain.casecmp(Puppet::Util::Windows::ADSI.computer_name) == 0 since it doesn't make 2 copies of the string. I recently enabled the rubocop rule to check for that.

Steven Towill (JIRA)

unread,
Jan 7, 2020, 8:02:04 PM1/7/20
to puppe...@googlegroups.com

Hi Gabriel Nagy,

Good news. I've tested changing line 207 in adsi.rb to the upcase syntax provided by you as well as the casecmp syntax suggested by Josh Cooper and both versions work.

I've also tested modifying the comment and the groups properties.
One thing I noticed when testing the group change in noop mode is the output isn't correct. The output returned contains references to the groups as defined in the manifest as well as the current built-in group name.

Notice: Compiled catalog for member01.domain.com in environment production in 0.02 seconds
Notice: /Stage[main]/Main/User[test_user]/groups: current_value BUILTIN\Administrators, should be 'Administrators,BUILTIN\Administrators,Remote Management Users' (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 1 event
Notice: Stage[main]: Would have triggered 'refresh' from 1 event
Notice: Applied catalog in 0.06 seconds

When running without --noop the output is as expected:

Notice: Compiled catalog for member01.domain.com in environment production in 0.03 seconds
Notice: /Stage[main]/Main/User[test_user]/groups: groups changed BUILTIN\Administrators to ['BUILTIN\Administrators', 'BUILTIN\Remote Management Users']
Notice: Applied catalog in 0.14 seconds

It looks like noop mode is not recognizing that BUILTIN\Group matches Group in the manifest.

I know this is cosmetic so I'm not sure if it's worth the effort to correct.

Thanks,
Steve

Dorin Pleava (JIRA)

unread,
Jan 9, 2020, 4:10:03 AM1/9/20
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Change By: Dorin Pleava
Fix Version/s: PUP 6.12.0
Fix Version/s: PUP 6.4.5
Fix Version/s: PUP 5.5.18

Gabriel Nagy (JIRA)

unread,
Jan 9, 2020, 4:18:03 AM1/9/20
to puppe...@googlegroups.com
Gabriel Nagy updated an issue
Change By: Gabriel Nagy
Release Notes Summary: When domain-joined and checking for a local account on Windows, ignore case on the domain/computer name comparison.
Release Notes: Bug Fix

Josh Cooper (JIRA)

unread,
Jan 9, 2020, 2:56:03 PM1/9/20
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jan 9, 2020, 2:57:04 PM1/9/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10219

Passed 5.5.x CI in 342e48a9, 6.4.x CI in 0cef459424

Kate Medred (JIRA)

unread,
Jan 13, 2020, 6:56:04 PM1/13/20
to puppe...@googlegroups.com
Kate Medred updated an issue
 
Change By: Kate Medred
Labels: puppet-agent puppet-apply resolved-issue-added type_and_provider windows

Jean Bond (JIRA)

unread,
Jan 13, 2020, 7:56:05 PM1/13/20
to puppe...@googlegroups.com
Jean Bond updated an issue
Change By: Jean Bond
Release Notes Summary:
When domain-joined and checking for a local account on Windows, ignore case on the domain/computer name comparison.


As of this release, Puppet ignores case for the domain/computer name comparison when checking for local accounts on domain-joined Windows machines.
Reply all
Reply to author
Forward
0 new messages