This topic describes how to access an SMB share with an SMB user.
Prerequisites
-
You have created a file gateway and added a cache. For more information, see Manage file gateways and Add a cache.
-
You have created an SMB share. For more information, see Create a share.
-
You have created an SMB user. For more information, see Add an SMB user.
-
You have added the SMB user to the Read/write Users list or the Read-only Users list of the SMB share. For more information, see Set up a share.
Procedure
You only need to create an SMB user on the file gateway to access the share. An additional user on the Windows client is not required.
GUI
-
Log on to the Windows client.
-
Open File Explorer (shortcut:
Win + E). In the navigation pane, click This PC. On the Computer tab, click Map network drive. -
On the Map Network Drive page, enter the SMB share address, select the Connect using different credentials checkbox, and then click Finish.
-
In the Enter network credentials dialog box, enter the SMB username and password, and then click OK to mount the share.
CLI
-
Log on to the Windows client.
-
Open a Windows command line tool, such as PowerShell or Command Prompt.
-
Run the following command:
net use z: <mount-point-path> /user:<smb-username> <smb-user-password>NoteIn this command,
z:is the drive letter. Select an unused drive letter.Example:
net use z: \\172.x.x.x\smb_share /user:test_user 123 -
Run the
net usecommand to view mount information. A status of OK means the share is successfully mounted.PS C:\Users\Administrator> PS C:\Users\Administrator> net use z: \\1xxx3\smb_share /user:test_user 123 The command completed successfully. PS C:\Users\Administrator> net use New network connections will be remembered. Status Local Remote Network ------------------------------------------------------------------------------- OK Z: \\1xxx3\smb_share Microsoft Windows Network The command completed successfully. PS C:\Users\Administrator>