Automatically Detecting And Re-Enabling Disabled NetServer Profiles
August 27, 2014 Hey, Joe:
I have a few people that no matter what I do, always manage to disable their i5/OS NetServer (NetServer) user profile when they are opening an IBM i file share. Is there anything I can do to automatically re-enable their profiles when this happens?
The first thing I’d do is check to see if there’s a reason your users are automatically disabling their NetServer profile when they try to open an IBM i file share as a Windows network drive. The most common situation I’ve found for auto-disabling NetServer profiles is when a user’s Windows network password doesn’t match their IBM i password. If there’s a mismatch between these passwords, a user is much more likely to accidentally disable their NetServer user profile then if both passwords are in sync.
When this happens, you can re-enable their NetServer access manually or automatically.
Manually Re-Enabling A NetServer Profile
There are three ways you can manually re-enable a user’s NetServer profile.
Directions for using the techniques to restart the NetServer server and using OpsNav to re-enable disabled NetServer user IDs can be found in my article on fixing NetServer access problems. You can learn more about downloading and setting up the IBM i GO NETS menu for enabling NetServer access from the green screen from this article.
There used to be a fourth method for re-enabling NetServer access by using the Change User Profile (CHGUSRPRF) command to change almost any user profile parameter. However, as I wrote about back in 2012, IBM disabled the CHGUSRPF method for re-enabling NetServer access because it “. . . did not provide a well-controlled interface for insuring that NetServer users are only re-enabled by a system administrator.” So that technique is no longer available.
Automatically Re-Enabling NetServer User Profiles
While these methods work for manually re-enabling a NetServer profile, you can also use a message monitoring program to automatically re-enable a NetServer profile. Here’s the drill I use in my shop. This technique will work with any IBM i monitoring software package that allows you to execute a command when it detects a specific message on your IBM i partition.
1. Go to IBM’s CL Program and Command to Re-Enable NetServer Access website to access the source code and instructions for creating the RSTNETUSRP program and the RSTNETUSR command on your IBM i partition. Create these objects on your system. RSTNETUSRP and RSTNETUSR perform the following functions.
2. Go into your IBM i monitoring software and set up a monitor to look for and respond to the following IBM i CPIB682 message in the QCPFMSG message file.
CPIB682 - User profile &1 disabled for i5/OS Support for Windows Network Neighborhood access.
3. Configure the monitor you set up in step 2 so that it performs the following command when it finds a CPIB682 message:
SBMJOB CMD(LIBRARY/RSTNETUSR USER('&1')) JOB(RSTNETSRV) JOBQ(QSYS/QSYSNOMAX) USER(USERNAME)
Where LIBRARY equals the library name where the RSTNETUSR command resides and USERNAME equals the name of an authorized user who can run the RSTNETUSR command.
Using this command, your message management software will submit a batch job that will automatically re-enable NetServer access for the user parameter named in the CPIB682 message (&1). Set up this monitor to run every few minutes and your system will automatically re-enable disabled NetServer user profiles without administrative assistance.
And that should take care of auto-enabling any disabled NetServer user profiles on your system, without having to contact an administrator.
Joe Hertvik is an IBM i subject matter expert (SME) and the owner of Hertvik Business Services, a service company that provides written marketing content and presentation services for the computer industry, including white papers, case studies, and other marketing material. Email Joe for a free quote for any upcoming projects. He also runs a data center for two companies outside Chicago, featuring multiple IBM i ERP systems. Joe is a contributing editor for IT Jungle and has written the Admin Alert column since 2002. Check out his blog where he features practical information for tech users at joehertvik.com.