Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My experimental network: 2 windows 7 PCs.

When using below commands trying to connect to PC2 (admin account with no password):

net use X: \\PC2\c$ /user:PC2\administrator

It will get:

System error 5 has occurred.
Access is denied.

However, if set a password to PC2 admin account, and do below:

net use X: \\PC2\c$ /user:PC2\administrator mypwd

This will work.

Is it necessary to have the password set to enable windows file sharing?

share|improve this question
Why would you ever want to make a password-less Administrator account network-accessible? – grawity Mar 5 '11 at 10:48
up vote 4 down vote accepted

By default, blank passwords aren't allowed for network login. To change this, modify the relevant setting in the Local Security Policy MMC snapin.

Windows Settings\Security Settings\Local Policies\Security Options\Accounts: Limit local account use of blank passwords to console logon only

See here for details.

share|improve this answer
This is perfect. However, is there any way to do this in command line? Need put it in script. – Stan Mar 5 '11 at 2:39
@Stan I haven't used it myself so I can't provide specific guidance, but it looks like secedit.exe using the /areas SECURITYPOLICY flag should do the trick - should be able to export the settings from one system and script the setup of others. – Shane Madden Mar 5 '11 at 6:55

You can use empty passwords with the following command:

net use X: \\PC2\c$ /user:PC2\administrator ""

share|improve this answer
Just because you can, doesn't mean you should. – Tom O'Connor Apr 7 '14 at 11:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.