IBM Support

NET USE Z: \\SystemName\ShareName /USER:UserID password fails with "Access Denied"

Question & Answer


Question

Microsoft requires that the DOMAIN part of the USER parameter be specified on the NET USE command.

Cause

Microsoft requires that the DOMAIN part of the USER parameter be specified on the NET USE command.

Answer

The Microsoft "NET USE" command "/USER" parameter has two parts, domainname and username. According to Microsoft's documentation, if you do not use domainname, then net use uses the current logged on domain. No information was found about what is used for this value if the user is not logged on to a domain.

IBM Support was questioned about a situation where a user attempted to map a NetServer drive from a Windows 7 PC, using the following NET USE syntax:
NET USE Z: \\SystemName\ShareName /USER:usrprf password /PERSISTENT:no
or:
NET USE Z: \\SystemName\ShareName /u:usrprf password /p:no


This had been working in the past, but now is rejected with:

"System error 5 has occurred.

Access is denied."


However, either of the following would prompt the user for password, the user would enter the same password, and the connection would be successfully made:

 
NET USE Z: \\SystemName\ShareName /USER:usrprf /PERSISTENT:no
or:
 
NET USE Z: \\SystemName\ShareName /u:usrprf /p:no

This is a Microsoft requirement/issue. A Google search reveals many variations of this sort of failure, most with no IBM i system involved.

Generally, at Windows 7 and above, NET USE requires the use of the following in the USER parameter:
 
/USER:DOMAINname\usrprf

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Component":"Host Servers","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB68","label":"Power HW"}}]

Document Information

Modified date:
20 January 2025

UID

nas8N1021548