WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

NetwareX Extender

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

nwSetPassword Issue

 Keywords:  

Question:

I am using the following to authenticate to E-Directory:
nwLogin(server, userid, password1)
where server=\\128.50.150.60
where userid=.CN=blah.OU=users.O=libraries
the above correctly authenticates (interestngly, when I use the tree name \\MYTREE, it fails. I need to use the ip, but that is ok with me)

PROBLEM SETTING PASSWORD:

However, when I try to change the password for that userid, I get the 8831 error.

nwSetPassword(userid, password1, 1)
Can someone tell me the proper format to use for userid when trying to set the password? Thanks,

Answer:

With NCP over IP [a.k.a NCP/UDP] protocol, the Novell Client handles name resolution very differently from how it did when using IPX/SPX and SAP broadcasts. Consider SAP broadcasts to work similar to NetBIOS name broadcasts on Windows, and think about what happens when client computers and servers become separated from each other on different IP subnets. Routers prevent broadcast traffic from crossing between subnets, and unless the router has specific functionality to allow for propagating SAP and NetBIOS broadcasts, what you end up getting are holes in your ability to resolve server [and tree] names in different parts of your network. On Windows, we use WINS servers to make sure that name resolution works properly across the enterprise network. On Novell, SLP servers are configured to do the same thing. If the Windows client isn't configured to use the WINS servers, or the Novell Client isn't configured to use SLP servers, then the name resolution will fail on the client.

What you are seeing with nwLogin() needs an actual server to use to perform the login operation. If name resolution is working, it will resolve a server name to a network address, and also resolve a tree name to the network address of a server within the specified tree. However, if name resolution isn't working, you must provide the IP address of a server within the desired tree.

Once you have established a connection to at least one server in the desired tree, the Novell Client will then use that connection to assist in resolving server & tree names.

As for why nwSetPassword() is having a problem...

It would appear that you haven't set your context properly inside your script, so the nw*() functions don't know which tree to be using. Remember, the Novell Client can be simultaneously authenticated to multiple trees, and setting your context properly allows the nw*() functions to know what tree to work with.

Call nwSetContext() as follows:

nwSetContext(0, '[Root]', 'CU-TREE')
Then, make your call to nwSetPassword() and continue to use the same FDN format that you used to specify your user object in nwLogin().
Article ID:   W18009
Filename:   nwSetPassword Issue.txt
File Created: 2012:11:26:09:53:32
Last Updated: 2012:11:26:09:53:32