Jira (PUP-9264) Puppet errors when deleting a Windows user with no user profile and when managehome=true

2 views
Skip to first unread message

Enis Inan (JIRA)

unread,
Oct 24, 2018, 5:27:05 PM10/24/18
to puppe...@googlegroups.com
Enis Inan created an issue
 
Puppet / Bug PUP-9264
Puppet errors when deleting a Windows user with no user profile and when managehome=true
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2018/10/24 2:26 PM
Priority: Normal Normal
Reporter: Enis Inan

When Puppet attempts to delete a user with no user profile, the Windows user provider errors the run with an unreadable error message. For example, running

puppet resource user jimmy ensure=absent password=foo managehome=true

when the user jimmy existed but did not have a user profile results in

Error: Could not set 'absent' on ensure: (in OLE method `Delete': )
    OLE error code:80070002 in SWbemServicesEx
      The system cannot find the file specified.
    HRESULT error code:0x80020009
      Exception occurred.
Error: Could not set 'absent' on ensure: (in OLE method `Delete': )
    OLE error code:80070002 in SWbemServicesEx
      The system cannot find the file specified.
    HRESULT error code:0x80020009
      Exception occurred.
Wrapped exception:
(in OLE method `Delete': )
    OLE error code:80070002 in SWbemServicesEx
      The system cannot find the file specified.
    HRESULT error code:0x80020009
      Exception occurred.
Error: /User[jimmy_two]/ensure: change from 'present' to 'absent' failed: Could not set 'absent' on ensure: (in OLE method `Delete': )
    OLE error code:80070002 in SWbemServicesEx
      The system cannot find the file specified.
    HRESULT error code:0x80020009
      Exception occurred.

The reason this happens is because of https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/windows/adsi.rb#L496 – specifically since the user does not have a user profile, no user profile's SID will match the user's SID. We should probably rescue this error code there.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Enis Inan (JIRA)

unread,
Oct 24, 2018, 5:28:06 PM10/24/18
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Jun 14, 2021, 7:08:02 PM6/14/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-9264
 
Re: Puppet errors when deleting a Windows user with no user profile and when managehome=true

We don't have plans on fixing this anytime soon, so I'm going to close. Please reopen if this happens again.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages