Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: wntRunAsUser Permissions on Local Machine
When I do wntRunAsUser(\\pdc,user,password,3,1) I get an error 639(logon failure)...the username and password are correct; however when I look at my local event logs I see a failed logon attempt(529) the domain is correct in the event record? but when I go to \\pdc I see no failed logon attempts... anyone got any ideas? Thanks!
If it is of the format "joe" then it will use "joe" in the //pdc I think
If you use the format "otherdc/joe" or was it "otherdc\joe" then it will try to authenticate to the "otherdc" domain.
domain\user, domain/user, user@domain ...
they still all only show up in the local event logs...
along with the local 529 errors there are also 681 errors with an errorcode of 3221225572 which corresponds to "User logon with misspelled or bad user account", which locally speaking is true because there is no local "user" account...
[WWWNT34I] LastError=1326 (LogonUser)
// // MessageId: ERROR_LOGON_FAILURE // // MessageText: // // Logon failure: unknown user name or bad password. // #define ERROR_LOGON_FAILURE 1326LAnd the errors are in your local event log? do you have access to the PDC event log, is there anything in there about it?
Post a sample script that does not work (replace username/password etc, but other than that leave as is).
My sample script is pretty short since the wntrunasuser is at the beginning:
addExtender("wwwnt34i.dll") DebugTrace(@on, "debugme.txt") srv="\\servername" user=user password=password wntRunAsUser(srv, user, password,3,1)and it blows up...
Thanks for all of these suggestions though!
user=user password=passwordwhich would give an error that the variable user is undefined, please fake up a more realistic looking sample like:
user="Domain7\jdoe" password="fudgesicles"as obviously the main problem seems to be in the setitngs of these parameters.
And you *are* trying to log on to \\PDC ??
or are you trying to log on to the local machine? What machine are you trying to get security permissions for? \\PDC or the local machine?
For the local machine the first parameter should be ""
Maybe you are getting kicked off the local machine.
Let me try to explain my situation a little better...
-I'm running this script from computerA in forest1
-I need to access a share and change the privledges of that share on computerB of domainX in forest2
-The only user that has rights to assign privledges to the share on computerB is userA
-userA is a domain user account of domainY in forest2
-so I need to runas userA from ComputerA but I can't:(
That's my best guess anyway.
Article ID: W15565
File Created: 2003:05:13:11:28:56
Last Updated: 2003:05:13:11:28:56