Yuav Ua Li Cas Thiaj Paub Tus Neeg Siv Lub Sid

Cov txheej txheem:

Yuav Ua Li Cas Thiaj Paub Tus Neeg Siv Lub Sid
Yuav Ua Li Cas Thiaj Paub Tus Neeg Siv Lub Sid

Video: Yuav Ua Li Cas Thiaj Paub Tus Neeg Siv Lub Sid

Video: Yuav Ua Li Cas Thiaj Paub Tus Neeg Siv Lub Sid
Video: yuav ua li cas thiaj muaj nyiaj siv [FWJ XYOOJ] 2024, Plaub Hlis Ntuj
Anonim

Cov neeg siv tau txheeb xyuas hauv Windows OS tsis yog npe, tab sis los ntawm cov cim kev ruaj ntseg tshwj xeeb, lossis Kev Ruaj Ntseg Cim - SID. Txoj kev daws teeb meem ntawm kev txiav txim siab ntawm SID ntawm tus neeg siv xaiv tsis tas yuav siv cov software ntxiv thiab tau ua los ntawm cov txheej txheem ntawm cov txheej txheem.

Yuav ua li cas thiaj paub tus neeg siv lub sid
Yuav ua li cas thiaj paub tus neeg siv lub sid

Cov Lus Qhia

Kauj ruam 1

Hu rau cov kab ke system tseem ceeb los ntawm nias lub "Pib" khawm thiab mus rau ntawm "Khiav" kev sib tham. Ntaus regedit hauv kab "Qhib" thiab paub meej tias yuav pib ntawm Registry Editor company los ntawm nias lub khawm OK. Nthuav cov ceg

HKEY_LOCAL_MACHINE / Software / Microsoft / WindowsNT / CurrentVersion / ProfileList

thiab nrhiav txhua tus neeg siv ID (SIDs). Mus rau ntawm tus lej ProfikeImagePath thiab nrhiav tus coj SID tus nqi siv npe. Tawm lub Registry Editor hlauv taws xob.

Kauj ruam 2

Kev ua haujlwm thim rov qab, thaum SID ntawm tus neeg siv tau paub thiab nws yog qhov yuav tsum tau txiav txim siab lub npe ntawm nws tus lej, tuaj yeem ua tiav siv cov lus txib reg.exe. Hauv qhov no, qhov lus txiav txim syntax zoo li:

reg nug HKEY_LOCAL_MACHINE / Software / Microsoft / WindowsNT / CurrentVersion / ProfileList / ProfileImagePath.

Kauj ruam 3

Siv cov built-in GetSID nqi hluav taws xob los txiav txim xyuas qhov tsis paub tus kheej rau tus neeg siv tau xaiv. Qhov hais kom ua syntax zoo li:

drive_name: > tau txais

Kev siv: getid / server1 account / server2 account.

Kauj ruam 4

Lwm txoj hauv kev rau programmatically tau txais SID ntawm cov neeg siv yam xav tau yog siv chav SecurityIdentifier chav kawm nyob rau hauv. NET moj khaum 2.0. Hauv qhov no, tus cim yuav tuaj yeem pom txoj hlua, byte array, lossis ua ke nrog WellKnownSidType thiab sau SID qhov tseem ceeb. Ib qho xwm txheej ntxiv kom tau txais cov txiaj ntsig xav tau yog hu rau WindowsIdentity chav kawm. Cov syntax rau cov lus txib zoo li:

kev siv Cov Txheej Txheem;

siv System. Security. Principal;

namespace GetSID

{

Chav Kawm Ntawv

{

zoo li qub khoob lug Main (hlua cam)

{

WindowsIdentity wid = Windowsidentity. GetCurrent ();

Console. WriteLine (wid. Name + SID yog 0, wid. User. Value);

Console. Read ();

}
}
}.

Pom zoo: