Microsoft MVP성태의 닷넷 이야기
Windows: 158. 컴퓨터와 사용자의 SID(security identifier) 확인 방법 [링크 복사], [링크+제목 복사],
조회: 21991
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)
(시리즈 글이 4개 있습니다.)
Windows: 158. 컴퓨터와 사용자의 SID(security identifier) 확인 방법
; https://www.sysnet.pe.kr/2/0/11819

.NET Framework: 2084. C# - GetTokenInformation으로 사용자 SID(Security identifiers) 구하는 방법
; https://www.sysnet.pe.kr/2/0/13206

.NET Framework: 2085. C# - gpedit.msc의 "User Rights Assignment" 특권을 코드로 설정/해제하는 방법
; https://www.sysnet.pe.kr/2/0/13207

.NET Framework: 2130. C# - Win32 API를 이용한 윈도우 계정 정보 (예: 마지막 로그온 시간)
; https://www.sysnet.pe.kr/2/0/13382




컴퓨터와 사용자의 SID(security identifier) 확인 방법

우선, 로그인 한 사용자의 SID는 다음의 명령어로 쉽게 확인할 수 있습니다.

C:\> whoami /user

USER INFORMATION
----------------

User Name               SID
======================= =============================================
testpc\testuser		S-1-5-21-572554840-1652100723-1290660254-1001

그리고 윈도우에 등록된 계정들은 다음의 명령어로 확인할 수 있습니다.

C:\> wmic useraccount get name,sid
Name                  SID
Administrator         S-1-5-21-572554840-1652100723-1290660254-500
DefaultAccount        S-1-5-21-572554840-1652100723-1290660254-503
ftp_user              S-1-5-21-572554840-1652100723-1290660254-1004
Guest                 S-1-5-21-572554840-1652100723-1290660254-501
perfUser              S-1-5-21-572554840-1652100723-1290660254-1010
RDV GRAPHICS SERVICE  S-1-5-21-572554840-1652100723-1290660254-1005
testuser	      S-1-5-21-572554840-1652100723-1290660254-1001
WDAGUtilityAccount    S-1-5-21-572554840-1652100723-1290660254-504

기타 위의 목록에 나오지 않는 윈도우 자체의 알려진 계정(예: LOCAL SYSTEM)들에 대해서는 다음의 표에 잘 정리가 되어 있습니다.

Windows 운영 체제에서 잘 알려진 보안 식별자
; https://support.microsoft.com/ko-kr/help/243330/well-known-security-identifiers-in-windows-operating-systems
; https://support.microsoft.com/en-us/help/243330/well-known-security-identifiers-in-windows-operating-systems

마지막으로, 컴퓨터에도 SID 값이 있는데, 이것은 sysinternals의 도구를 이용하면 볼 수 있습니다.

d:\Tools\SysInternals> psgetsid

PsGetSid v1.45 - Translates SIDs to names and vice versa
Copyright (C) 1999-2016 Mark Russinovich
Sysinternals - www.sysinternals.com

SID for \\testpc:
S-1-5-21-572554840-1652100723-1290660254

그런데, 보면 아시겠지만 로컬 컴퓨터의 경우라면 굳이 PsGetSid를 할 필요는 없습니다. 왜냐하면, 위에서 출력된 계정들을 보면 뒤의 식별자를 제외하고는 앞이 모두 컴퓨터의 SID(S-1-5-21-572554840-1652100723-1290660254)로 시작하고 있기 때문에 그걸로 유추할 수 있습니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 2/20/2019]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 76  77  78  79  80  81  [82]  83  84  85  86  87  88  89  90  ...
NoWriterDateCnt.TitleFile(s)
11883정성태5/3/201926042.NET Framework: 827. C# - 인터넷 시간 서버로부터 받은 시간을 윈도우에 적용하는 방법파일 다운로드1
11882정성태5/2/201922300.NET Framework: 826. (번역글) .NET Internals Cookbook Part 11 - Various C# riddles파일 다운로드1
11881정성태4/28/201922428오류 유형: 532. .NET Core 프로젝트로 마이그레이션 시 "CS0579 Duplicate 'System.Reflection.AssemblyCompanyAttribute' attribute" 오류 발생
11880정성태4/25/201918229오류 유형: 531. 이벤트 로그 오류 - Task Scheduling Error: m->NextScheduledSPRetry 1547, m->NextScheduledEvent 1547
11879정성태4/24/201926624.NET Framework: 825. (번역글) .NET Internals Cookbook Part 10 - Threads, Tasks, asynchronous code and others파일 다운로드2
11878정성태4/22/201922450.NET Framework: 824. (번역글) .NET Internals Cookbook Part 9 - Finalizers, queues, card tables and other GC stuff파일 다운로드1
11877정성태4/22/201922438.NET Framework: 823. (번역글) .NET Internals Cookbook Part 8 - C# gotchas파일 다운로드1
11876정성태4/21/201921542.NET Framework: 822. (번역글) .NET Internals Cookbook Part 7 - Word tearing, locking and others파일 다운로드1
11875정성태4/21/201922487오류 유형: 530. Visual Studo에서 .NET Core 프로젝트를 열 때 "One or more errors occurred." 오류 발생
11874정성태4/20/201922654.NET Framework: 821. (번역글) .NET Internals Cookbook Part 6 - Object internals파일 다운로드1
11873정성태4/19/201921201.NET Framework: 820. (번역글) .NET Internals Cookbook Part 5 - Methods, parameters, modifiers파일 다운로드1
11872정성태4/17/201922000.NET Framework: 819. (번역글) .NET Internals Cookbook Part 4 - Type members파일 다운로드1
11871정성태4/16/201920788.NET Framework: 818. (번역글) .NET Internals Cookbook Part 3 - Initialization tricks [3]파일 다운로드1
11870정성태4/16/201918996.NET Framework: 817. Process.Start로 실행한 콘솔 프로그램의 출력 결과를 얻는 방법파일 다운로드1
11869정성태4/15/201924791.NET Framework: 816. (번역글) .NET Internals Cookbook Part 2 - GC-related things [2]파일 다운로드2
11868정성태4/15/201920779.NET Framework: 815. CER(Constrained Execution Region)이란?파일 다운로드1
11867정성태4/15/201919987.NET Framework: 814. Critical Finalizer와 SafeHandle의 사용 의미파일 다운로드1
11866정성태4/9/201923155Windows: 159. 네트워크 공유 폴더(net use)에 대한 인증 정보는 언제까지 유효할까요?
11865정성태4/9/201918858오류 유형: 529. 제어판 - C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools is not accessible.
11864정성태4/9/201917567오류 유형: 528. '...' could be '0': this does not adhere to the specification for the function '...'
11863정성태4/9/201917426디버깅 기술: 127. windbg - .NET x64 EXE의 EntryPoint
11862정성태4/7/201920100개발 환경 구성: 437. .NET EXE의 ASLR 기능을 끄는 방법
11861정성태4/6/201919479디버깅 기술: 126. windbg - .NET x86 CLR2/CLR4 EXE의 EntryPoint
11860정성태4/5/201923325오류 유형: 527. Visual C++ 컴파일 오류 - error C2220: warning treated as error - no 'object' file generated
11859정성태4/4/201920540디버깅 기술: 125. WinDbg로 EXE의 EntryPoint에서 BP 거는 방법
11858정성태3/27/201921392VC++: 129. EXE를 LoadLibrary로 로딩해 PE 헤더에 있는 EntryPoint를 직접 호출하는 방법파일 다운로드1
... 76  77  78  79  80  81  [82]  83  84  85  86  87  88  89  90  ...