All SMB error codes are explained in the following MSDN documentation:
The following is a list of commonly seen errors when using an Metasploit module that involves SMB:
If you are testing against newer Windows systems such as Windows 7, by default you will see STATUS_ACCESS_DENIED because these systems no longer allow remote access to the share. To change this, that target machine will need to manually change the LocalAccountTokenFilterPolicy setting to 1 in the registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "LocalAccountTokenFilterPolicy"=dword:00000001
Invalid SMBUSER or SMBPASS datastore option.
Or, in Local Security Settings, you should probably set Network access:Sharing and security model for local accounts to “Local users authenticate as themselves”.
Invalid SMB share datastore option.
On Windows, in Local Security Settings, Network access:Sharing and security model for local accounts to “Local users authenticate as themselves”.