Questions tagged [sid]

In the context of the Microsoft Windows NT line of operating systems, a SID (Security IDentifier) is a unique, immutable identifier of a user, user group, or other security principal.

Windows grants or denies access and privileges to resources based on access control lists (ACLs), which use SIDs to uniquely identify users and their group memberships.

When a user logs into a computer, an access token is generated that contains user and group SIDs and user privilege level. When a user requests access to a resource, the access token is checked against the ACL to permit or deny particular action on a particular object.

SIDs are useful for troubleshooting issues with security audits, Windows server and domain migrations.

197 questions
183
votes
5 answers

How SID is different from Service name in Oracle tnsnames.ora

Why do I need two of them? When I have to use one or another?
Georgy Bolyuba
  • 7,935
  • 7
  • 26
  • 34
57
votes
10 answers

How can I convert from a SID to an account name in C#

I have a C# application that scans a directory and gathers some information. I would like to display the account name for each file. I can do this on the local system by getting the SID for the FileInfo object, and then doing: string…
Sam Hopkins
46
votes
4 answers

Convert a username to a SID string in C#/.NET

There's a question about converting from a SID to an account name; there isn't one for the other way around. How do you convert a username to a SID string, for example, to find out which HKEY_USERS subkey relates to a user of a given name?
crb
  • 7,964
  • 6
  • 35
  • 46
31
votes
11 answers

How can I get the SID of the current Windows account?

I am looking for an easy way to get the SID for the current Windows user account. I know I can do it through WMI, but I don't want to go that route. Apologies to everybody that answered in C# for not specifying it's C++. :-)
Franci Penov
  • 71,783
  • 15
  • 124
  • 160
19
votes
3 answers

What is the maximum length of a SID in SDDL format

I'm building Active Directory Authentication into my application and I am planning to link my application's internal accounts to a user's domain SID. It is easier for me to work with the string format of the sid than a byte array so I was planning…
Brian Cauthon
  • 5,484
  • 2
  • 21
  • 26
13
votes
3 answers

How can I change the SID of an Oracle XE instance

I needed to change the SID of an Oracle XE database (not the Service Name) to match a production database. When I tried searching online, most of the pages were describing changing or adding a service name through tnsnames.ora; that's not what I…
Osama Al-Maadeed
  • 5,523
  • 4
  • 26
  • 47
11
votes
2 answers

The best way to resolve display username by SID?

I read a list of SIDs from the registry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. How would one resolve the display username (e.g. DOMAIN\user, BUILT-IN\user) given the SID string in C#?
Dennis C
  • 23,310
  • 12
  • 68
  • 98
11
votes
4 answers

How to get the logon SID in C#

How does one retrieve the Windows Logon SID in C# .net? (not the user SID, but the unique new one for each session)
Jos
  • 113
  • 1
  • 1
  • 5
10
votes
2 answers

Localization for security identity in .NET

I was looking to implement a named pipe for service/client communication in .NET and came across this code that, while initializing server side of the pipe had to set up a security descriptor for the pipe. They did it this way: PipeSecurity…
ahmd0
  • 14,832
  • 29
  • 117
  • 218
10
votes
4 answers

When is setsid() useful, or why do we need to group processes in Linux?

I've tried man(3) setsid, but it only explains how to use it, I don't quiet understand when is setsid useful?
daisy
  • 19,459
  • 24
  • 111
  • 218
9
votes
4 answers

Given a user's SID, how can I get the AD DirectoryEntry?

I have the user's SID as byte[] within windowsPrincipal.getIdentity().getSid(). How can I get an Active Directory entry (DirectoryEntry) from the SID?
mtm
  • 115
  • 2
  • 2
  • 6
7
votes
3 answers

How to extract computer/machine SID?

I'm looking for a way to extract the computer SID using Delphi code. There's a tool called PsGetSid from SysInternals that does this, but I can't use it in my application. I searched for a code example in Google and couldn't find one. How can I…
Ran
  • 391
  • 1
  • 4
  • 10
6
votes
1 answer

get machine SID (including primary domain controller)

I need to get machine SID (not computer account's SID) in C#. Computer is specified be host name, it is't necessarily local computer and it can be domain computer or workgroup computer. I using this helper class to call LookupAccountName API…
Tomáš Holan
  • 183
  • 2
  • 9
6
votes
1 answer

Strophe gets invalid SID

I'm building a web based client with strophe and jquery and I'm using openfire as server. Almost everything its working, I can get the roster list, send and receive messages, but when I'm trying to change my presence from avaliable to xa or dnd or…
Biguá
  • 161
  • 1
  • 13
5
votes
3 answers

VB.NET - How to Convert SID to Group Name with Active Directory

Using VB.NET, How do you Convert the sid to Group Name with Active Directory? example: I need to get "group_test" and not "S-1-5-32-544" The code I'm using is: Public ReadOnly Property Groups As IdentityReferenceCollection Get Dim irc…
Brian McCarthy
  • 4,328
  • 15
  • 46
  • 64
1
2 3
13 14