NetUserAdd problem

Stephen Milton milton at isomedia.com
Thu Jan 20 19:57:18 EST 2000


I have a script that attempts to use the NetUserAdd function from the
win32net library.  On most of my machines, it works great, but on one NT4
server system, it fails with the following error:

Traceback (innermost last):
  File "C:\Scripts\QUICKT~1.PY", line 26, in ?
    win32net.NetUserAdd(server, 1, d)
pywintypes.api_error: (2351, 'NetUserAdd', 'This computer name is invalid.')

I have tested using the win32netdemo.py file that comes with win32all-125,
and I get the same error.  I can change the computer name to all variations
(IP address, FQDN, machine name, UNC-style, etc.) and it just won't work on
this machine.

Any ideas of what to try to do to this machine to get it to work?  Has
anyone else seen similar problems?

E-mail replies appreciated, I can post a fix summary once I figure it out.

Steve Milton
ISOMEDIA.COM






More information about the Python-list mailing list