In some situations, such as:
- Gaining access to the local Client-Side Cache (CSC) without altering the security permissions;
- Running a migrationscript on folders which are not accessible for domain admins;
- Troubleshooting;
- Etc.
It can be a solution to impersonate yourself as local system. This can be performed by using the following tools PSExec from SysInternals. Once downloaded to your local machine, perform the following procedure:
- Run a command prompt as Administrator:
C:\Users\User01\Desktop>whoami /user
USER INFORMATION
—————-
User Name SID
=============== ===========================================
EXAMPLE\user01 S-1-5-21-260572601-835865397-367162617-8584C:\Users\rrdhyv8\Desktop>psexec -i -s -d CMD
PsExec v2.0 – Execute processes remotely
Copyright (C) 2001-2013 Mark Russinovich
Sysinternals – www.sysinternals.comCMD started on CLIENT with process ID 8528. - You will notice an additional Command Prompt opened. In this command prompt you can execute the commands as Local System:
C:\Windows\system32>whoami /user
USER INFORMATION
—————-
User Name SID
=================== ========
nt authority\system S-1-5-18