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?
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.
You can use empty passwords with the following command:
net use X: \\PC2\c$ /user:PC2\administrator ""
works really well
you might need to run:
first