Jump to content

Looking for a way to get the SID?


Recommended Posts

Hi,

Some registry info reside in HKEY_USER\<SID>\... so to import those change, you'll need to know the SID...

Not sure if someone posted something like this, here is my contribution!

I'm using JScript files to configure things, so whats next is written in js. sorry for you batch gurus :) But I'm sure it could be adapt...

I'm using the PSGetSID tool from Systernals to get the sid.

Shell = WScript.CreateObject("WScript.Shell");

psgetsid_output = Shell.Exec("psgetsid Put the username here");

model_sid = /S-[A-Za-z0-9-]{43}/;

SID = psgetsid_output.StdOut.Read(1000).match(model_sid);

I don't know whats the earlier time you can use it. Didn't try it and to avoid problems I'm using it once logged in...

Since I don't have access to all computers, I don't know if their is 43 characters after "S-" in the id... or does it began always with an "S-"?? Thanx to clarifying...

Link to comment
Share on other sites


why would you need the SID?

If you apply the settings once the desktop loads, they would get overwritten by the "current" settings upon restart.

also, HKU\SID is dynamicaly linked to HKCU. Change a key in HKCU and then check the same key in HKU\SID, they both change.

But yes, it always starts with S- and 43 characters if it isn't the Default User,Admin, or Guest

Link to comment
Share on other sites

  • 5 months later...

About SIDs.. is it possible to change it ? :|

AFAIK NTFS uses SIDs to store dirs/files permissions, so when it gets regenerated every OS reinstall, permissions are lost...

I am not sure of that, but several months ago I got a problem with that. I had 'normal' accounts, one for me and the other for my sister (quite limited ;]). After having installed fresh OS, I noticed that permissions for sister's account are not working. On the Security tab of dir/file properties window I got one SID like S-1-5-21-..... which I belive is sister's account SID from previous installation. New account was named exactly the same, so I thought everything will be ok, but it wasn't :/

In a few days I am going to reinstall my sys again and I want to avoid problem with permissions.

Anybody can confirm or deny having similar problems ?

I've been trying to find some info about it on this forum and through google, but without luck :/

Link to comment
Share on other sites

You can remove a sid before syspreping. I believe there is a support tool for this.

Never heard of ayone wanting to change a Sid. Unless you wish to unencrypt files made under an old Sid?

:)

Link to comment
Share on other sites

No.. I just want to be sure, that every permission I've set for my current accounts on all partitions except the first one (this will be formatted) will work on my 'new' system. So.. how Windows recognizes that newly created user is the same as one from previous system if both of them have different SIDs ? By username?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...