What's difficult with OS/2 to NT is:
a) getting your LAN administrators to accept that you can logon and use their domains without breaking them
b) getting driver/printer assignments at logon<b>.</b>
I can't do anything about a) - that's your job.
What we can do is something about b).
Facts:
- You can logon to an NT domain using the IBM LAN Requester
- You can use Netbios or Netbios over IP
- You <b>cannot</b> have a home directory in the NT Server sense assigned to you from the User Manager for Domains panel
- You can log on to Windows NT 4.0 domains from OS/2 PCs
- You can log on to Windows 2000 domains, both in mixed and native mode, from OS/2 PCs
- You can perform manual NET USE commands from your OS/2 PC
- You can connect to NT print servers and print quite happily
- You can get logon assignments if you do a little bit of REXX coding
- You can change your NT domain password from an OS/2 PC (or even your OS/2 domain password from an NT PC as a matter of interest)
- You can perform limited administration of an NT domain from an OS/2 PC</ul>Point 1 - IBM LAN Requester.
Point 2 - Netbios or Netbios over IP
This is covered in the links above. A couple of things - use Netbios if you are on a LAN, not a WAN - it's faster. Use Netbios over IP if you're using a WAN - it's friendlier over the network, and you may well find that Netbios has been filtered out of the routers so you won't be able to connect to the remote server(s) anyway. If you're using Netbios over IP and you need to connect to lots of servers, you need a decent NBNS server - we use the Shadow software (a flyer for which comes inside the Warp Server box as a matter of interest).
Point 3 - NT home directories
Can't be done. Doesn't work. If one is set for your NT domain account, you'll get a NET8191 error at logon. I can't get round this - I've been trying for a while. You'll have to get your domain administrator to remove that from your profile. You'll need to use a script file to attach to a sharename as if it were a home directory.
Point 4 - NT 4.0 domains
My PC is Warp 4 FP12 and I can log on to our large (10,000+ users) NT domain with NT 4.0 PDC/BDCs at work no problem.
Point 5 - Windows 2000 domains
As I'm an MCSE as well, I get loads of beta code. Amongst that lot is the Windows 2000 beta code. I've tested everything here on a small Windows 2000 domain. The server was (slowly) running Windows 2000 Advanced Server Beta 3 - build 2031. I tested the logon script on what's called 'mixed' mode (a Windows 2000 domain which contains pre-Windows 2000 server as well), and also in 'native' mode (a full Active Directory Windows 2000 server only domain).
Point 6 - Manual NET USE commands
I'm sure you already know this as this is how most people set up their network assignments. Syntax is just the same as if you were connecting to a LAN Server share.
Point 7 - NT Print Servers
All works fine. In fact you can see some of the common heritage here between NT and OS/2 if you set up a networked printer from the Network Printer template. It will query the server for the type of printer and prompt you to install the relevant driver if you do not have it installed, just like a LAN Server print server. Don't worry about NT trying to automatically download Windows print drivers to your PC either - it doesn't happen.
Point 8 - Logon assignments
This is where you really start to see the historical links between NT and OS/2. I've been trying this for some time now and a little while ago, I decided to try to use the REXX LAN Server DLL that IBM provide for LAN Server 3.0/4.0 domains to attempt logon assignments (here - 397135 bytes). Remember that this was written initially in March 1993 - this is version 2.0.7 dated 1996 and that NT 4.0 wasn't about when this was first started. But it works just fine to NT 4.0 domains. In fact, there are some things that you can do with this DLL that you can't do from NT - list members of a group that you are not a member of for example.
I'll start off with the list members of a group example - it's easy.
/* Get the groups in which a user account isdefined */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs
/* Load the REXX LAN ServerDLL */
NETUSERGROUPS = 330
/* You have to get the hang of this VARIABLE = number business. View the supplied .INF */
/* Basically, you need to set a number which tells the DLL whatit's going to do */
SrvName = '\\servername'
UserId = 'username'
myRc = NetEnumerate(NETUSERGROUPS, 'userGroups', SrvName, UserId)
/* Run the NetEnumarate function supplying the server to run againstand the userid to */
/* query. The list of groups will be put into stem variableuserGroups. */
/* the variable userGroups.0 contains the number of groups theuser is in */
if myRc <> '0' then do
say 'Got error from NetEnumerate() ' myRc
call DropLsRxutFuncs
exit 9
end
/* Error if return code is not zero - ie if the user does not existor the server */
/* cannot be found or anythingelse */
if userGroups.0 = 0 then do
say 'User account belongs to no group'
call DropLsRxutFuncs
exit 0
end
say 'Number of entries: ' userGroups.0
say
do i=1 to userGroups.0
say 'Group Name: ' userGroups.i
end
/* List groups which the user supplied is a memberof */
call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'
/* Do what all good programmers do and tidy up at theend */
exit 0
Bear in mind that this works with NT domains and also OS/2 domains. It is interesting to note that you can do more from OS/2 with this thanfrom NT. For example, you can list all members of a group that youare not a member of (Administrators is a good one to try). Try this:
/* Get group comment */
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs
NETGROUP = 70
SrvName = '\\servername'
GroupName = 'Admins'
myRc = NetGetInfo(NETGROUP, 'groupInfo', SrvName, GroupName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLsRxutFuncs
exit 9
end
say
say "Group Name: " groupInfo.name
say "Group Comment: " groupInfo.comment
NETGROUPUSERS = 340
myRc = NetGetInfo(NETGROUPUSERS, 'groupInfo', SrvName, GroupName)
if myRc <> '0' then do
say 'Got error from NetGetInfo() ' myRc
call DropLsRxutFuncs
exit 9
end
say
do i=1 to groupInfo.0
say "UserId: " groupInfo.i
end
call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'
exit 0
To finish this bit off - here's how to get logon assignments for OS/2PCs on an NT domain.
First of all, you need to get your administrators to do a bit of work- set up your user profile as follows (User Manager for Domains Profilesetting in NT 4.0 server):
{mosimage}
or (from Start, Programs, Administrative Tools, Active Directory Usersand Computers in Windows 2000 Advanced Server):-
{mosimage}
Hopefully you can see what I'm going to say here - you can run a programat logon and pass it parameters if you wish. The location of thescript on the server (by default) is as follows:-
x:\WINNT\SYSTEM32\REPL\IMPORT\SCRIPTS for NT 4.0 servers
x:\WINNT\sysvol\sysvol\DNS.name\SCRIPTS for Windows 2000 servers (actually,this is the NETLOGON share - type NET SHARE NETLOGON on the NT server tosee your location).
Your LAN administrators may have changed these anyway, so they're thebest people to ask (and in fact the only people who can copy a script intothere anyway).
The following is the logonos2.cmd from the above examples:-
/* Logonos2.cmd */
PARSE UPPER ARG WHEREAREWE .
SAY 'LOCATION IS 'WHEREAREWE
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs'
call LoadLsRxutFuncs
SELECT
WHEN WHEREAREWE="NORWICH" THEN
SERVER = "CPQHOME"
WHEN WHEREAREWE="LONDON" THEN
SERVER = "LONSRV01"
OTHERWISE
NOP
END
NETWKSTA = 350
GetUserInforc = NetGetInfo(NETWKSTA, 'wkstainfo' , '')
USERNAME = wkstainfo.username
call value 'USER' , USERNAME, 'OS2ENVIRONMENT'
rc = value('USER' , USERNAME, 'OS2ENVIRONMENT')
NETUSE = 270
useInfo.local = 'T:'
useInfo.remote = '\\'SERVER'\'USERNAME
useInfo.password = ''
useInfo.asg_type = 'Disk device'
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
useInfo.local = 'U:'
useInfo.remote = '\\'SERVER'\WINAPPS'
useInfo.password = ''
useInfo.asg_type = 'Disk device'
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
useInfo.local = 'V:'
useInfo.remote = '\\'SERVER'\DOSAPPS'
useInfo.password = ''
useInfo.asg_type = 'Disk device'
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
useInfo.local = 'W:'
useInfo.remote = '\\'SERVER'\OS2APPS'
useInfo.password = ''
useInfo.asg_type = 'Disk device'
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
useInfo.local = 'LPT1:'
useInfo.remote = '\\'SERVER'\HPlaserJ'
useInfo.password = ''
useInfo.asg_type = 'Spooled Printer'
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
useInfo.local = 'R:'
useInfo.password = ''
useInfo.asg_type = 'Disk device'
SELECT
WHEN WHEREAREWE="NORWICH" THEN
useInfo.remote = '\\'SERVER'\NORWICH'
WHEN WHEREAREWE="LONDON" THEN
useinfo.remote = '\\'SERVER'\LONDON'
OTHERWISE
NOP
END
SetDriverc = NetAdd(NETUSE, 'useInfo', '')
say SetDriverc
call SysDropFuncs
call DropLsRxutFuncs
call RxFuncDrop 'LoadLsRxutFuncs'
exit 0
Basically, you can do what you want. What I've demonstrated is the passing of a parameter which defines your location, and therefore your local server name. This obviously depends upon standards for share names being applied across your domain servers, but I would hope they're already in place anyway.
The logon script assigns:
R: depending upon your location as passed by the parameter
T: as a 'home' directory (ie not a home directory in the fullest senseof the word, but one which only you can use)
U: as Windows apps
V: as DOS apps
W: as OS/2 apps
LPT1 as a Laserjet printer
This will all probably raise more questions than it answers, but hopefully it will get you thinking about how you could apply it in your domain. What it gives you is the ability to share drive letters at logon, giving central change control and no visits required to user's workstations.
Point 9 - Password changing
Want to change your NT domain password from OS/2? Simple - use
NET PASSWORD /DOMAIN:domainname userid oldpassword newpassword
Want to change your OS/2 domain password from an NT PC? Simple- press Control-Alt-Delete (which fool thought of C-A-D for this?), andselect Change Password. Change the domain name to the OS/2 domainand that's it.
Point 10 - Limited admin for NT domains from OS/2 PCs
You can list groups, change your password, list members of the group and other inoffensive things. You can use REXX as above, the NET USER command from the command line, the LAN Administration GUI supplied with OS/2 or (my favourite over the years) NetPM (here - 250298 bytes). This is something I came across years ago before the LAN Admin GUI was around. It allows you to apply ACPs easily, create shares easily, clone users (really useful before the GUI) and a host of other things. It does not understand WSoD application templates as it has not been updated for a while (since February 1997), but is still perfectly functional and has a small footprint (something you can't accuse the LAN Admin GUI of having). It shows itself to its best in a large domain of several hundred users. Where the GUI takes a while to list all the users, NetPM is almost instantaneous. Recommended.
Colin Haynes
There are some comments to this article in the old forum and it can be found here - but for new comments, please use the new comment feature.