We have reached the fourth appointment with NetServer. Previously we talked about:
In this article we talk about how to access shared resources via NetServer from a PC client.
Index
Access to the shared resources of the NetServer can take place in a manner temporary by accessing the resource by its name in the form of UNC ( \server-nameshare-name
) or in a way permanent by mapping the resource as a network drive.
When accessing a shared resource without providing explicit login credentials :
In some situations, even if you specify the correct user and password (and having made sure that the user is not disabled for the NetServer), Windows keeps re-proposing the window for requesting credentials. In this case you can try to precede the user name with the domain name of the server, i.e. the IP address of the IBM i server: eg. 192.168.0.1MYUSER
.
IBM i and Windows user | IBM i and Windows password | Guest user ID configured | Access granted to NetServer |
the same | the same | no | yes with windows user |
the same | different | no | credential requests |
different | same or different | no | credential requests |
the same | the same | Yes | yes with windows user |
the same | different | Yes | credential requests |
different | same or different | Yes | yes with guest ID user |
To map a network drive using commands run from a command prompt NET USE
:
net use[device-name|*][\server-nameshare-name][password][/USER:[[domain-name] user] [/SAVECRED] [/PERSISTENT:{YES|NO}]
[password][/USER:[[domain-name]user]
: Specify the server login credentials. In some situations it may be necessary to prefix the username with the domain name of the server.[/SAVECRED]
: Save your server login credentials for later reuse[/PERSISTENT:{YES|NO}]
: if you specify /PERSISTENT:YES
the network drive will be automatically reconnected at the next logon of the PCTo disconnect a network drive:
net use[device-name] /DELETE
To disconnect all attached network drives:
net use * /DELETE
Other useful commands to manage network connections:
net view
: List the servers available on the networknet view \server-name
: List the shared resources of a serverFrom Windows to map a network drive:
From Windows to access a shared resource without mapping it as a network drive :
For more information on Network Drive Mapping in Windows see the Microsoft document: https://support.microsoft.com/en-gb/windows/map-a-network-drive-in-windows-29ce55d1-34e3-a7e2-4801-131475f9557d .
The NetServer service uses TCP ports 137 , 138 And 139 (NetBios) e 445 (CIFS). So if the server is on a remote network from the client protected by a firewall, you need to make sure that network traffic on those ports is allowed.
In the first article we have already covered the compatibility map between SMB on Windows clients and NetServer on IBM i. Let’s see some commands that can be useful on Windows clients to check the SMB version.
The cmdlet Get-SmbConnection
tells us what version of SMB has been negotiated with the server. The command must be run with administrator rights. After connecting to a shared server resource you can run the command Get-SmbConnection
.
To find out which version of SMB is running on your PC, you can access a shared resource in loopback
dir \localhostc$
and then get the information with Get-SmbConnection
.
You can use the command to check if the services required to manage shared network resources are running on your PC Get-Service Lanman*
:
The main page of the IBM documentation on NetServer can be consulted at this link: https://www.ibm.com/docs/en/i/7.5?topic=services-i-netserver . Other useful resources can be found in the attached document:
In the next article we will talk about how solve the most common problems concerning NetServers.
We are pleased to receive and share this "tip & trick" from Patrick Rizzi, which introduces a technique that allows…
I take inspiration from a response by Michael Mayer on the Midrange.com mailing lists to someone who asked how to…
Businesses are increasingly seeking tools to enhance efficiency, collaboration, and resource management. Enterprise Resource Planning (ERP) systems provide a comprehensive…
Early April saw the release of the "Spring Version" of ACS Access Client Solution, version 1.1.9.5 Interesting new features especially…
If the packed agenda of sessions at Common Europe Congress 2024, June 3-6 Milan, wasn't enough for you, here's another…
Debugging functions with Visual Studio Code have been available for some time but this new version 2.10.0 simplifies the handling…