04d - IFS (EN)

NetServer for everyone – part 4

Access shared resources

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.


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 :

  • the user and password with which you are currently logged in to Windows is used.
    Attention: If the Windows user is longer than 10 characters, only the first 10 will be used to log in to the NetServer server. For example, if you are connected to Windows with the “administrator” profile, an attempt will be made to logon to the server with “ADMINISTRA”
  • if the user does not exist on the server the guest user ID will be used (cf. configure the service )
  • if a guest user ID has not been configured you will be prompted for credentials
  • If the windows user is an IBM i user but the passwords are different the credentials will be prompted and the guest user ID will NOT be used.

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. .

IBM i and Windows userIBM i and Windows passwordGuest user ID configuredAccess granted to NetServer
the samethe samenoyes with windows user
the samedifferentnocredential requests
differentsame or differentnocredential requests
the samethe sameYesyes with windows user
the samedifferentYescredential requests
differentsame or differentYesyes with guest ID user

Connect from command prompt

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 PC

To 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 network
  • net view \server-name : List the shared resources of a server

Connect from Windows

From Windows to map a network drive:

  • Open Windows Explorer, open the context menu on the icon Net or This PC and choose the Map network drive
  • Then in the next window choose the name of the unit, search or type the path of the shared resource and possibly select the check boxes “Reconnect at startup” and “Connect with different credentials”

From Windows to access a shared resource without mapping it as a network drive :

  • Click on the Start button and choose “Run…” or press the key combination Win+R
  • In the next window type the path of the shared resource to open

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 .

TCP ports and firewalls

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.

Related Posts
NetServer for everyone – part 1

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 2

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 3

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 5

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

About author

IBM i's mentor IBM Champion 2021 for Power Systems

Leave a Reply

Your email address will not be published. Required fields are marked *