Windows command “net use” failed when login with a no password account

file-sharingwindows 7

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?

Best Answer

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.