Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We want to change file permissions for the windows default user group.

The problem is, depending on windows version (xp,win 7) and language, the name of this default user group differs. Sometimes the name of the group is "Benutzer", sometimes it is "User".

How can I get this name programmatically?

share|improve this question
    
WTF is a 'default user group'? –  Chris S Jul 20 '10 at 13:10
    
The user group which name is "Users" in english, that is normal users for the computer which have not admin rights. the group exists of every windows pc after installation. –  codymanix Jul 20 '10 at 13:14
    
There's no difference in the name between versions, only languages. The name is Users regardless of whether it's W2K, WinXP, W2K3, Vista, W2K8, or Win7. –  joeqwerty Jul 20 '10 at 13:17
    
No, in german Windows XP the name is "VORDEFINIERT/Benutzer" –  codymanix Jul 20 '10 at 13:29
    
What I meant is that for each version there is a USERS group. There is no other name for the group. The name may translate differently in other languages but it still translates to USERS, as opposed to the name being something different, like BOB. –  joeqwerty Jul 20 '10 at 14:08

1 Answer 1

up vote 2 down vote accepted

You shouldn't be changing the name of the group. Rather, you should be referencing the group by its well-known SID. You can't guarantee what the names of built-in groups will be in other localized versions of Windows, or in future versions, but the well-known SIDs will stay the same.

share|improve this answer
    
Which of them is the default users group? –  codymanix Jul 20 '10 at 13:10
    
The default user group (when creating local users) is Users. The default user group (when creating domain users) is Domain Users. In addition, when joining a computer to a domain, the Domain Users group is added as a member of the local Users group and the Domain Admins group is added as a member of the local Administrators group. –  joeqwerty Jul 20 '10 at 13:18
    
Which SID will this be? –  codymanix Jul 20 '10 at 13:30
1  
@codymanix: S-1-5-32-545 is the SID you're looking for. –  Evan Anderson Jul 20 '10 at 13:59
1  
So true. support.microsoft.com/kb/243330 –  Kara Marfia Jul 20 '10 at 14:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.