|
|
Vance Hunt
has provided home-user help desk style support for his consulting company for over 6 years. Making his home in beautiful Southern California, Vance provides general computer Q&A for users via his weekly column.
|
|
|
|
|
 | Friday, November 16, 2007 |
| Wouldn't it be nice if we could all self-heal like Windows. |
| By Vance Hunt |
| |
|
|
|
I am attempting to script a shortcut to
launch XP's ability to repair a connection using
NETSHELL.DLL. I found an entry point which seems to be what I need,
however it doesn't seem to be working. The command that I am issuing is the
following: "C:\WINDOWS\system32\RUNDLL32.EXE
NETSHELL.DLL,RepairConnection". I thought that maybe I needed to pass an
argument to NETSHELL.DLL for what network adapter's
connection needed to be repaired, and looked up several places in the registry
which corresponded to the network adapter, and used these references in the
command, however it still didn't work. Any ideas?
| | |
|
|
When it comes to running DLL functions via RunDLL32 on pretty much any
platform of Windows, you'll find the information pretty quickly via Google.
Heck, we have over 250 RunDLL32
command line options alone. Combine the words
NETSHELL.DLL and RepairConnection however, and Google pops up with two found results, both of which are
function lists for the DLL and both of which are meant to be used in conjunction
with C++, C#, and .NET programming. The reality is that most DLLs are
written to be used from within compiled applications, not via the command line.
Even those DLLs that are used via RunDLL32 typically have very few functions
externally available; NETSHELL.DLL has but
one out of
twenty five usable this way. It is a safe guess that if you're own lab
efforts and a specific Google search do not reveal a functional RunDLL32 command
line for that function - one doesn't exist.
For my reader's benefit, your original post to me included the actions that
one could take from the command line to repair network connections:
ipconfig /renew
arp -d *
nbtstat -R
ipconfig /flushdns
nbtstat -RR
ipconfig /registerdns
If your desired end result is to simply have a scripted resolution, my advice
would be to go with what you know works and script those commands into a single
file, then create a shortcut to the script. It adds one additional step
and a few additional calls, but if it works and gives you the results you want,
well, it works and gives you the results you want.
|
|
|
Starting [a while back], every time I try to join a computer to my Windows, I
get a message saying that the account I'm using is invalid or has insufficient
privileges. It isn't and it has; Its my account and it works just fine and
I double checked my account status in the Active Directory. I need to join
new computers - any thoughts on why it would give me this error?
| | |
|
|
Many things can contribute to either an invalid account/insufficient
privileges error, as well as the "no domain controller" error often seen when
joining a computer to the domain.
Way simplified, the general flow when performing this action is that the
client workstation gathers information about itself and the network you want to
join, and broadcasts out to the domain a request for a domain controller.
A DC answers the workstation and a lovely dance between the two of them
commences that results in either a join or a denial.
If you're denied, here are several possible reasons:
- You mistyped the name of the domain or the account credentials
- The account is locked or does not have sufficient rights to join the
domain
- The local DC did not respond to you. This can often be the case
and can be hard to spot, especially if you can log on to the domain from
another domain member. If you are specifying the domain using the
NetBIOS name, you will only be broadcasting in your local LAN; if you are
logging on to an existing member, any DC across your WAN can authenticate
you. This can often by resolved by switching to the FQDN of your
domain instead (e.g. your NetBIOS domain name is
MyDomain and your FQDN is MyDomain.com)
- There is a rogue DC or other server on your local LAN that is responding
to your broadcast first.
The easiest way to determine what is happening is to attempt the join, then
back out of the joining after the error and return to the desktop.
Navigate to C:\WINDOWS\DEBUG and open
NetSetup.LOG. Follow the log to determine who
is talking to you, or not. Below is an example of a failed join, failing with
the invalid account error because a rogue server answered first but was not
actually part of the specified domain.
10/29 11:12:48
-----------------------------------------------------------------
10/29 11:12:48 NetpValidateName: checking to see if 'MYDOMAIN' is valid as type
3 name
10/29 11:12:48 NetpCheckDomainNameIsValid [ Exists ] for 'MYDOMAIN' returned 0x0
10/29 11:12:48 NetpValidateName: name 'MYDOMAIN' is valid for type 3
10/29 11:13:06 -----------------------------------------------------------------
10/29 11:13:06 NetpDoDomainJoin
10/29 11:13:06 NetpMachineValidToJoin: 'WASVMDELETE'
10/29 11:13:06 NetpGetLsaPrimaryDomain: status: 0x0
10/29 11:13:06 NetpMachineValidToJoin: status: 0x0
10/29 11:13:06 NetpJoinDomain
10/29 11:13:06 Machine: WASVMDELETE
10/29 11:13:06 Domain: MYDOMAIN
10/29 11:13:06 MachineAccountOU: (NULL)
10/29 11:13:06 Account: MYDOMAIN\JohnDoe
10/29 11:13:06 Options: 0x25
10/29 11:13:06 OS Version: 5.1
10/29 11:13:06 Build number: 2600
10/29 11:13:06 ServicePack: Service Pack 2
10/29 11:13:06 NetpValidateName: checking to see if 'MYDOMAIN' is valid as type
3 name
10/29 11:13:06 NetpCheckDomainNameIsValid [ Exists ] for 'MYDOMAIN' returned 0x0
10/29 11:13:06 NetpValidateName: name 'MYDOMAIN' is valid for type 3
10/29 11:13:06 NetpDsGetDcName: trying to find DC in domain 'MYDOMAIN', flags:
0x1020
10/29 11:13:21 NetpDsGetDcName: failed to find a DC having account
'WASVMDELETE$': 0x525
10/29 11:13:21 NetpDsGetDcName: found DC '\\ROGUESERVER' in the specified domain
10/29 11:13:21 NetUseAdd to \\ROGUESERVER\IPC$ returned 1326
10/29 11:13:21 Trying add to \\ROGUESERVER\IPC$ using NULL Session
10/29 11:13:21 NetpJoinDomain: status of connecting to dc '\\ROGUESERVER': 0x0
10/29 11:13:21 NetpGetLsaPrimaryDomain: status: 0x0
10/29 11:13:21 NetpGetDnsHostName: Read NV Hostname: WASVMDELETE
10/29 11:13:21 NetpGetDnsHostName: PrimaryDnsSuffix defaulted to DNS domain
name: WWW.MYDOMAIN.COM
10/29 11:13:21 NetpLsaOpenSecret: status: 0xc0000034
10/29 11:13:21 NetpGetLsaPrimaryDomain: status: 0x0
10/29 11:13:21 NetpLsaOpenSecret: status: 0xc0000034
10/29 11:13:21 SamConnect to \\ROGUESERVER failed with 0xc0000022
10/29 11:13:21 NetpJoinDomain: status of setting machine password: 0x5
10/29 11:13:21 NetpJoinDomain: initiaing a rollback due to earlier errors
10/29 11:13:21 NetpLsaOpenSecret: status: 0x0
10/29 11:13:21 NetpJoinDomain: rollback: status of deleting secret: 0x0
10/29 11:13:21 NetpJoinDomain: status of disconnecting from '\\ROGUESERVER': 0x0
10/29 11:13:21 NetpDoDomainJoin: status: 0x5
No easy answers, but this log and the list of possible reasons should point
you in the right direction for resolution.
|
Comments:
[0]
[Show Disclaimer]
The information posted within the comments section are the opinions of its authors.
Such opinions may not be accurate and they are to be used at your own risk. Dx21, LLC cannot verify the validity of the
statements made within the posted comments. ¶ Messages that harass, abuse or threaten other members; have obscene or otherwise objectionable content; have spam,
commercial or advertising content will be removed. Please do not post any private information unless you want it to
be available publicly. Never assume that you are completely anonymous and cannot be identified by your posts.
|
Previous Ask Vance Questions:
|