Re: Login to Novell NetWare from my own GINA DLL



BK wrote:
Hi!, this is the situation:

1) We have our own GINA.DLL library for Windows logon. I the aim to
connect to the Novell Netware server we successfully execute NWDSLogin,
NWCCOPenConnByName and NWDSAuthenticateConn, but after the system logon
the Novell connection does not last. Any clues, what are we missing?

Hmmm.... There's something tricky about the order in which authentication happens. Your Novell eDirectory credentials are tied to the security context of your session in Windows. If you haven't yet gotten a local logon session [using either local or domain Windows credentials] at the time you do your Novell eDir authentication, you may simply be losing the eDdir authentication when the security context changes. One way of demonstrating this is to logon to eDir, map some drive letters to NetWare servers and then use the "Run as..." service/command to launch a program under different Windows credentials; that program will run in a different security context and it won't have any of your mapped drives or eDir authentication state information and it will have to logon to eDir separately.


When you logon to eDir, there's a connection created called the "monitored" connection, which is the connection used purely for eDirectory access and not for file system access. It will show up in MONITOR.NLM's status a having a "*" meaning it's unlicensed. You only need a licensed connection to a server to access print & file services, while pure eDirectory access can be done using an unlicensed connection. The monitored NDS connection is managed by the Novell Client itself, but other connections that you create on your own are fully controlled by your code. So, when I see you referencing making a connection to a server by name and then authenticating that connection, you may be creating an ephemeral connecton that doesn't last. I don't see you making reference to the API function that licenses a connection, nor do I see you referring to setting a flag to make the connection permanent, so the connection may easily be disposed of by the client if it detects that nothing is using the connection. The connection may also appear to disappear if the security context changes as discussed earlier.


2) What is the best way to pass the login information from our Gina.dll
to Novell Client? Or how can we suppress the logon Novell Client
dialog?

Oh... I'm not sure about that one. There's already some GINA chaining going on depending on whether MSGINA.DLL or NWGINA.DLL is set as your primary GINA. IIRC, what happens is that the primary GINA collects the plain-text credentials and then it passes them to each network provider and requests that they be used to perform autentication. If any given network provider can't authenticate the credentials, then that provider's GINA ends up having to present a logon dialog box for the user to respond to. In the case of NWGINA.DLL, it can accept separate sets of credentials for both eDirectory and Windows, but if you don't provide separate Windows credentials then it simply uses the CN value of your eDirectory username and your password as the Windows credentials. If MSGINA.DLL is the primary GINA, then it only accepts Windows credentials and if the Novell Client can't use those to authenticate then it will prompt for the required credentials.


I seem to recall seeing something in the MSDN docs at one point regarding how you tell a network provider to perform a logon, a password change, etc... in a vendor-neutral manner using the network provider API functions & interfaces.

Have you tried directly doing the NWDSLogin() call within your GINA? Does the Novell Client still prompt for credentials or does it acknowledge that you're authenticated to eDirectory at that point?


3) What is the way to change password on Novell server? The example
from Novell does not work (using NWCCOpenConnByName and
NWChangeObjectPassword).

That's a bindery mode API function, not a eDirectory API function. Take a look at the eDirectory Libraries for C in the Novell Developer Kit [NDK]. Much like the MSDN kit & web site, Novell has a NDK kit & web site that documents all of the API functions available in the Novell Client and on the NetWare server. API functions that are usable on *both* Win32 & NetWare are known a Novell Client XPLAT [Cross Platform] API functions, and in this case, you're interested in the ones with names of the form "NWDS*()".


http://developer.novell.com/ndk is where you start at, and browse to the documentation from there. There are specific functions to be used for settings & changing a password in eDirectory.



--
Chuck Chopp

ChuckChopp (at) rtfmcsi (dot) com http://www.rtfmcsi.com

RTFM Consulting Services Inc.     864 801 2795 voice & voicemail
103 Autumn Hill Road              864 801 2774 fax
Greer, SC  29651

Do not send me unsolicited commercial email.
.



Relevant Pages

  • Re: Last logged in for user accounts
    ... >auditing enabled for logon events. ... >Joe Richards Microsoft MVP Windows Server Directory ... >> features I'm used to having availible to me though ... >> does have the same type of features as Novell just in ...
    (microsoft.public.win2000.active_directory)
  • Re: Last logged in for user accounts
    ... auditing enabled for logon events. ... Joe Richards Microsoft MVP Windows Server Directory Services ... > I'm a born and raised Novell guy from the past and> features I'm used to having availible to me though Netware> I wish I had in Windows. ... If I just use the security log it may be over-> written prior the the users last login. ...
    (microsoft.public.win2000.active_directory)
  • Logon to domain through VPN
    ... I have a windows xp PC try to logon to the domain controller remotely ... through VPN connection, failed. ... password, after two prompt, it just dropped connection. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: Logon to Novell at the same time as TS (same credentials)?
    ... Vera Noest wrote: ... Trying to logon to a Novell server with Windows 2003R2 ...
    (microsoft.public.windows.terminal_services)
  • Re: Logon to Novell at the same time as TS (same credentials)?
    ... Thanks, that was already unchecked, but in the same area I found the "always prompt for password" setting and checked that. ... Now users do get the opportunity to log in to Novell but it looks like they will have to enter name and password at two prompts. ... Trying to logon to a Novell server with Windows 2003R2 terminal ...
    (microsoft.public.windows.terminal_services)