Issue #22048 has been updated by Josh Cooper.

Status changed from Unreviewed to Accepted
Keywords set to windows

Thanks for looking into this Dustin. It seems the `resources` type is a big 
hack, and bizarre that it contains knowledge about other types. I thought you 
might be able to use WMI to determine which accounts are builtin and which are 
not, but I didn't see a way. Another option is to resolve names into SIDs, and 
purge any non-builtin account whose SID is `S-1-5-21-<domain>-<rid>`, where 
`rid` is not one of the well-known SIDs. For example, `Administrator`has rid 
`500`, but `albert`, a user I created has rid `1000`.

<pre>
C:\>wmic path win32_useraccount get name, sid
Administrator                 S-1-5-21-2397885826-1833024046-1055597067-500
albert                        S-1-5-21-2397885826-1833024046-1055597067-1000
</pre>

I don't know if windows always starts at 1000 for newly created accounts?

----------------------------------------
Bug #22048: Managing user resources on Windows fails
https://projects.puppetlabs.com/issues/22048#change-96351

* Author: Dustin Mitchell
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: windows
* Branch: 
----------------------------------------



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to