Colin's how to use an NT domain home directory without getting a NET8191

So you've been searching newsgroups about those NET8191 messages and come to the conclusion that a user set up on an NT domain with an NT home directory as below can do nothing about them if they're using OS/2?  Wrong.

This is a slightly different slant on my how to connect OS/2 to NT page in that it's only about how to connect to an NT domain home directory which is, on the face of it, problematic.  Indeed I have said on that page that it is impossible.  Well, it's not.  Whilst sorting out a problem here getting 200+ OS/2 PCs connecting to an NT domain, I stumbled across the solution to this.

You need some 'glue' to get this going and funnily enough, it's REXX (lovely language REXX - you might have spotted that I like it) and the LSRXUTIL REXX API you get from the IBM OS/2 Warp Server applets (http://www-4.ibm.com/software/os/warp/downloads/e1a1/e1a1.html).

This API includes one called NETGETINFO which when run against an NT domain controller will return (amongst other things) the home directory that has been assigned to that user.  From getting this information, it is a simple matter of then NET USEing that alias as your standard home directory drive letter.  Below is the code sample to do this:-

NETUSER = 280

myRc = NetGetInfo(NETUSER, 'userInfo', SrvName, USERNAME)

NETUSE = 270

say userInfo.home_dir

useInfo.local = 'T:'
useInfo.remote = userInfo.home_dir
useInfo.password = ''
useInfo.asg_type = 'Disk device'

SetDriverc = NetAdd(NETUSE, 'useInfo', '')

say SetDriverc

The only other thing to do is prevent the error message that you get (NET8191) at logon on an OS/2 PC when you log on to an NT domain which has a home directory set up for your user.  I did this the simple way by setting wrkheuristic 38 to 0.  All this does is prevent any logon warning messages appearing on the screen.  This means that you will not see any messages, so problem determination might get difficult when back end servers go down, but I'll leave that to you to sort out.

The long and the short of this is that your NT administrator can set up a 'normal' NT account with a 'normal' home directory and we can pick it up with OS/2.

We took this one stage further.  We have one logon script that runs as standard for all users (some 11,500+) on our domain.  Here, we have this called LOGON.CMD and it's a simple command file.  Luckily, this runs just fine under OS/2 as it is suffixed .CMD.  We inserted a test at the very top of the LOGON.CMD to see if the PC is an NT PC.  If it is, then we jump down a bit and run the standard logon script that we have always had for NT.  If not, we pass control to my new LOGONOS2.CMD (in x:\WINNT\SYSTEM32\REPL\IMPORT\SCRIPTS) and run that.

This has the advantage that you can log on to an NT PC or an OS/2 PC and the proper logon script for that PC will run.

The problem here becomes one of knowing which server to run this against (the parameter SrvName above) - we operate in a WAN environment with 40+ locations and I don't want to design something which queries a central server every time from remote locations across low bandwidths.  There is a function called NetEnumerate(NETSERVER, parm1) which does not work in my environment, so I don't know which server has verified my logon.  If anyone could help me here, I would be grateful.

Also, you have to provide a location for the LOGONOS2.CMD as the LOGON.CMD simply searches in the local PCs path and will not find the OS/2 logon command file.  I have done this by setting an environment variable on each PC with the Netbios name of the NT BDC in that location, and then running \\%BDCSERVER%\NETLOGON\LOGONOS2.CMD.  Not as good I would have liked - it would have been nice to discover which NT Domain Controller has verified my logon, but it does the trick.

Sample LOGON.CMD code below:-

@ECHO OFF
REM ***************************************************************************
REM   Start Of Script
REM ***************************************************************************
REM *
REM * Logon Script Launcher
REM *
REM ***************************************************************************

ECHO Starting Logon Processor...

REM ***************************************************************************
REM   Check OS
REM ***************************************************************************

REM ***************************************************************************
REM   OS/2 logon requires an environment variables:
REM   SET BDCSERVER=bdc server in that location
REM ***************************************************************************

IF "%OS%"=="Windows_NT" GOTO NT_Logon
GOTO End

:OS2_Logon

\\%BDCSERVER%\NETLOGON\LOGONOS2.CMD

GOTO End

REM ***************************************************************************
REM NT Logon
REM ***************************************************************************
:NT_Logon

REM Normal NT logon commands here

Email me if you want some more information.

Back to Home Page.

Version 1.0
Date 24/01/2000