sid

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? ...

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

Hi there, 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++. :-) ...

The best way to resolve display username by SID?

I read a list of SID from the registry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. How to resolve the display username (e.g. DOMAIN\user, BUILDIN\user) by a given SID string in C#? ...

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 needed to do. ...

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 GetNameFromSID( SecurityIdentifier sid ) { NTAccount ntAccount = (NTAccount)sid.Translate( typeof(...

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? ...

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 to store it in the database as a string. How long should I make the field to ensure SID's...

ASP.NET - Get the Principal / Relative Identifier (RID) for a DirectoryEntry / SID

I am using Active Directory in a custom MembershipProvider class to authenticate users in an ASP.NET 2.0 intranet application and associate their sid with a profile for the application. When the ActiveDirectoryMembershipProvider is used, the ProviderUserKey object for the MembershipUser is as follows SecurityIdentifier sid = (SecurityI...

Reset password for renamed Administrator account

I need to create a .VBS script to reset the Windows local administrator password on a large group of computers. My problem is that some of our sites have renamed the administrator account for security reasons. Does anyone have a script which changes the password of the administrator account based on the SID of the original Administrato...

How to get the logon SID in c#

Hi, How does one retrieve the Windows Logon SID in c# .net? (not the user sid, but the unique new one for each session). Thanks in advance, ...

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 function: private static class Helper { internal enum SID_NAME_USE { ...

Get User SID From Logon ID (Windows XP and Up)

I have a Windows service that needs to access registry hives under HKEY_USERS when users log on, either locally or via Terminal Server. I'm using a WMI query on win32_logonsession to receive events when users log on, and one of the properties I get from that query is a LogonId. To figure out which registry hive I need to access, now, I n...