Windows Server 2003
--
Questions
--
Followers
Top Experts
PSEXEC - Access is denied - remote admin credentials
I'm trying to open a command prompt on a remote server (Windows 2008 server). As I understand it, I must have admin rights on the remote machine, but it only works when logged in as an admin user on the local machine (2003). If I login as a standard user on the local machine PSEXEC fails with "Access is denied".
The command is:
psexec \\servername -u username -p password cmd.exe
Any help appreciated.
The command is:
psexec \\servername -u username -p password cmd.exe
Any help appreciated.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
That is correct, PSEXEC is to be launch with elevated rights, in addition to this PSEXEC is also to be copied to the SYSTEM32 folder on the remote server.
I know it works because i use it :)
I hope this helps.
Michael
I know it works because i use it :)
I hope this helps.
Michael
you can run cmd in elevated mode to run psexec
see https://www.experts-exchange.com/questions/23127265/Launch-CMD-on-remote-computer.html
see https://www.experts-exchange.com/questions/23127265/Launch-CMD-on-remote-computer.html
From a run prompt you can also launch cmd locally as an admin on a remote server using the below:-
runas /user:DOMAIN\USER cmd
When this is running as the Administrative account, you can then use PSEXEC and launch CMD without further usernames or passwords.
runas /user:DOMAIN\USER cmd
When this is running as the Administrative account, you can then use PSEXEC and launch CMD without further usernames or passwords.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Assume that you are currently sitting at, or logged in to the local computer, computer A. You want to use psexec to run a process on computer B which is the remote computer.
First step:
psexec is a program and runs locally on computer A. It has to execute to be able to do it's fun remote magic. So it will run as the locally logged on user unless you do run it special like using runas as MichaelIanClaridge posted above. If the user running psexec doesn't have the correct permissions to run psexec as a program locally then you will be denied permission.
Secondly:
psexec runs on computer A, but connects and starts to make changes to computer B. When connecting to computer B psexec will use the current user account running psexec, or the user specified by the psexec "-u domain\user" parameter if it was supplied. This means psexec needs to either be running on computer A as a user with admin rights to computer B or needs to have been started with the -u parameter to specify an admin user on computer B. If not, you will also get permission denied.
If you wanted to copy the text in your command prompt when you try to run psexec we can help pinpoint where the issue is and help provide the correct solution. Right click in the command window, select "Mark". Then highlight the text and right click to copy it to the clipboard. Then you can paste it here.
First step:
psexec is a program and runs locally on computer A. It has to execute to be able to do it's fun remote magic. So it will run as the locally logged on user unless you do run it special like using runas as MichaelIanClaridge posted above. If the user running psexec doesn't have the correct permissions to run psexec as a program locally then you will be denied permission.
Secondly:
psexec runs on computer A, but connects and starts to make changes to computer B. When connecting to computer B psexec will use the current user account running psexec, or the user specified by the psexec "-u domain\user" parameter if it was supplied. This means psexec needs to either be running on computer A as a user with admin rights to computer B or needs to have been started with the -u parameter to specify an admin user on computer B. If not, you will also get permission denied.
If you wanted to copy the text in your command prompt when you try to run psexec we can help pinpoint where the issue is and help provide the correct solution. Right click in the command window, select "Mark". Then highlight the text and right click to copy it to the clipboard. Then you can paste it here.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Windows Server 2003
--
Questions
--
Followers
Top Experts
Windows Server 2003 was based on Windows XP and was released in four editions: Web, Standard, Enterprise and Datacenter. It also had derivative versions for clusters, storage and Microsoft’s Small Business Server. Important upgrades included integrating Internet Information Services (IIS), improvements to Active Directory (AD) and Group Policy (GP), and the migration to Automated System Recovery (ASR).