Novell is now a part of Micro Focus

I am having trouble using NWDSVerifyObject- Password( )....

Articles and Tips: qna

01 Aug 2002


Q.

I am having trouble using NWDSVerifyObject- Password( ). As long as there are no "special" characters in the password, everything works perfectly. For example, this works fine, with "toto" as the valid password:

NWDSVerifyObjectPassword(ctx, 0, m_pCharNamOperateur, _T("toto") );

But with the following:

NWDSVerifyObjectPassword(ctx, 0, m_pCharNamOperateur, _T("e") );

I get the error: ERR_FAILED_AUTHENTICATION (-669) ("e" is the valid password).

Other special characters such as &,�,�,~,and ' in the password give me the same error. However, I can still log in to Novell Directory Services with such passwords. This is quite frustrating. I suspect I am having a problem with the character tables, but I cannot figure out what it is. I tried to deactivate UNICODE, but I get the same errors.

NWDSVerifyObjectPassword(ctx, 0, m_pCharNamOperateur, "e") fails.

I have also used NWInitUnicodeTables, with no luck. I am using Visual C++ 6.0, NetWare 5.1, and Windows 2000. Any ideas?

A.

You need to convert the password with the Win32 API CharToOEM() before passing it to NWDSVerifyObjectPassword( ). This should solve your problems. You have to do the same with any pathnames, etc., that you pass to NetWare functions if they contain characters from the upper character set. And the Euro character is in a class all of its own - CharToOEM doesn't cope with it at all.

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates