Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

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


  • Please log in to reply
5 replies to this topic

#1
Rez.

Rez.

    Newbie

  • Member
  • 38 posts
  • Joined 08-May 06
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.


How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,972 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

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.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#3
Rez.

Rez.

    Newbie

  • Member
  • 38 posts
  • Joined 08-May 06
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.

#4
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,972 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Here are the 2 options:
Posted Image
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg

#5
Mr Snrub

Mr Snrub

    Former MSFT

  • Super Moderator
  • 775 posts
  • Joined 14-September 04
  • OS:Windows 8 x64
  • Country: Country Flag

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.)

My TechNet Blog
I have CDO. It's like OCD except the letters are in alphabetical order, as they should be.


#6
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,972 posts
  • Joined 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Donator

Also, I forgot, you may need to see if the remote shutdown option is disabled or not-set in Local Security Policy.
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
tpxmsfn1_zps393339c1.jpg




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users