Jump to content

Access is denied.(5) Error - Soloution needed.


Rez.

Recommended Posts

Hi-

I've recently made the switch to Windows 7 from XP and I'm having trouble shutting down a remote computer via the command-line using the Shutdown command.

Everytime I use the shutdown command, I get a "Access is denied.(5)" error. I've been searching Google for the better part of 10 Days and have tried multiple soloutions, None of them have worked so far.

Here's the setup: Two computers both running Windows 7 Ultimate networked together over a Wireless Network. I can successfully ping both computers over the network and I can access all my shares on both Computers. Both computers have the same named user account and password, And both accounts are administrators.

- Using psshutdown I get an Access is denied error (Even if i use the -u and -p switches to supply user account info).

- Added the User accounts to Local Security Policy > Local Policies > User Rights Assignments > Force shutdown from a remote system on both computers.

- Made sure that Local Security Policy > Local Policies > Security Options > Network access: Sharing and security model for local accounts is set to Classic.

- Disabled the Windows Firewall on both computers.

+ I do not have any Anti-virus or 3rd party Firewalls on either system.

I really need this feature which worked fine in XP. All the answers I've come across seem to point to a privilege problem somewhere, I just can't figure out where. Please, Any input would be appreciated at this stage - Sorry for the long post and thanks for reading.

Link to comment
Share on other sites


There are two options to set for allowing RDP. One is the legacy and one is the more secure mode. Which do you have selected? Are they both the same on both machines? You can also try adding each computer's account (that you use for RDP) into each other's Administrators group as COMPUTERNAME\USERNAME.

Link to comment
Share on other sites

Hi and thank you for replying.

I'm not sure what you mean when you say "Two options for RDP". RDP actually works. I can connect to the remote computer via RDP, Pull up an elevated command prompt and execute the shutdown command from there. That works.

What I can't do is pull up an elevated command prompt and simply execute the same command: shutdown -m \\Computername -s -f . Where would I find the option to select secure mode vs classic mode? I'm also not sure how to add a user from one computer to the Administrator group of another. Any tips? Thanks again for responding.

Link to comment
Share on other sites

What I can't do is pull up an elevated command prompt and simply execute the same command: shutdown -m \\Computername -s -f .
Do you have file & printer sharing enabled on the target machine?

(In the following commands, replace "remote" with the network name of the remote client, and "user1" / "user1pw" with the name and password of an Administrator on the remote machine.)

If you run the following in a command prompt, what does it report?

net view \\remote

Have you tried psexec to run shutdown on the remote machine?

Something like:

psexec \\remote -s -u remote\user1 -p user1pw shutdown -s -t 0

I'm also not sure how to add a user from one computer to the Administrator group of another.
You can't - local user accounts mean nothing outside of the machine on which they are defined, it is an isolated security realm.

(The old-school method of creating the a user with the same name and password on 2 machines appeared to work as the security realm is first tried as the calling client, which fails, then as the remote client, which works - but the local user account is not being used for the remote authentication.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...