Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

(시리즈 글이 2개 있습니다.)
Windows: 159. 네트워크 공유 폴더(net use)에 대한 인증 정보는 언제까지 유효할까요?
; https://www.sysnet.pe.kr/2/0/11866

Windows: 252. 권한 상승 전/후 따로 관리되는 공유 네트워크 드라이브 정보
; https://www.sysnet.pe.kr/2/0/13411




권한 상승 전/후 따로 관리되는 공유 네트워크 드라이브 정보

다음과 같은 질문이 있군요.

커맨트 창과 API로 파워쉘 결과가 달라요.
; https://forum.dotnetdev.kr/t/api/8232/3

질문자가, 화면 캡처까지 해서 정보를 올렸기 때문에 쉽게 답이 나올 수 있는 상황이었습니다. ^^ (이처럼, 질문할 때는 가능한 많은 문맥 정보를 공유하시면 답을 얻을 수 있는 확률이 높아집니다.)

이것을 간단하게 재현해 볼까요? ^^ 우선, 일반 사용자 권한으로 Command Prompt를 띄운 후, 네트워크 드라이브를 하나 매핑시켜 둡니다.

C:\temp> net use K: \\testpc\mytemp
The command completed successfully.

C:\temp> net use
New connections will be remembered.

Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           K:        \\testpc\mytemp           Microsoft Windows Network
The command completed successfully.

그다음, 해당 창에서 그대로 PowerShell로 전환해 확인하면 동일하게 매핑 정보가 있습니다.

C:\temp> powershell

PS C:\temp> Get-PSDrive

Name           Used (GB)     Free (GB) Provider      Root                                               CurrentLocation
----           ---------     --------- --------      ----                                               ---------------
Alias                                  Alias
C                 488.70        364.43 FileSystem    C:\                                 ...
K                 103.52         15.88 FileSystem    \\testpc\mytemp
...[생략]...

이 상태에서 "관리자 권한"의 Command Prompt를 띄워서 확인해 보면 아무런 공유 정보가 없습니다.

C:\Windows\System32> net use
New connections will be remembered.

There are no entries in the list.

당연히, "관리자 권한"의 PowerShell로 전환해도 역시 공유 정보가 없습니다.

PS C:\Windows\System32> Get-PSDrive

Name           Used (GB)     Free (GB) Provider      Root
----           ---------     --------- --------      ----
Alias                                  Alias
C                 488.70        364.42 FileSystem    C:\
...[생략]...

참고로, 이에 대해서는 예전에도 한 번 아래의 글에서 언급한 적이 있습니다. ^^

네트워크 공유 폴더(net use)에 대한 인증 정보는 언제까지 유효할까요?
; https://www.sysnet.pe.kr/2/0/11866#runas

이뿐만 아니라, 같은 계정이어도 관리자 권한으로 승격한 전/후에 대해 UAC는 "filtered standard user access token", "full access token" 2가지 유형으로 관리를 하기 때문에 특권(Privileges)도 달라진다는 점도 기억해 두시고. ^^




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







[최초 등록일: ]
[최종 수정일: 9/12/2023]

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

비밀번호

댓글 작성자
 



2024-09-19 08시24분
How can I tell whether two programs will share drive letter mappings?
; https://devblogs.microsoft.com/oldnewthing/20240912-00/?p=110251
정성태

... [16]  17  18  19  20  21  22  23  24  25  26  27  28  29  30  ...
NoWriterDateCnt.TitleFile(s)
13541정성태1/29/20249624VS.NET IDE: 188. launchSettings.json의 useSSL 옵션
13540정성태1/29/20249519Linux: 69. 리눅스 - "Docker Desktop for Windows" Container 환경에서 IPv6 Loopback Address 바인딩 오류
13539정성태1/26/20249328개발 환경 구성: 703. Visual Studio - launchSettings.json을 이용한 HTTP/HTTPS 포트 바인딩
13538정성태1/25/20249927닷넷: 2211. C# - NonGC(FOH) 영역에 .NET 개체를 생성파일 다운로드1
13537정성태1/24/202410715닷넷: 2210. C# - Native 메모리에 .NET 개체를 생성파일 다운로드1
13536정성태1/23/202410323닷넷: 2209. .NET 8 - NonGC Heap / FOH (Frozen Object Heap) [1]
13535정성태1/22/202410762닷넷: 2208. C# - GCHandle 구조체의 메모리 분석
13534정성태1/21/202410164닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/202410142닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/202410200닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/202410579닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20249861닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/202410052닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/202410219Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/202410315오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/202410635닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20249775오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20249802오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20249794오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/202410627닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/202410279닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/20249956오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....' [1]
13519정성태1/10/20249656닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/202410383닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
13517정성태1/8/20249503스크립트: 63. Python - 공개 패키지를 이용한 위성 이미지 생성 (pystac_client, odc.stac)
13516정성태1/7/20249684닷넷: 2196. IIS - AppPool의 "Disable Overlapped Recycle" 옵션의 부작용
... [16]  17  18  19  20  21  22  23  24  25  26  27  28  29  30  ...