Page 1 of 1 1
Topic Options
#198554 - 2010-05-06 09:33 AM Tokenized script - USE command ignores parameters: error 1326
Vikers Offline
Just in Town

Registered: 2010-05-06
Posts: 2
Loc: Norway
When using the command USE with /user: and /pass: in a tokenized script, it seems that the script ignores those parameters. In result you get a "1326 - Logon failure: unknown user name or bad password.".

Running the .kix seems ok, but when running the tokenized version it fails.

test.kix:
USE k: "\\server\share" /USER:server\user /PASS:mypass
? "USE K: " + @ERROR
results in: USE K: 0

test.kx (from source in script above):
results in: USE K: 1326

The security log on the server tells me that the .kx tries to connect as anonymous.

I've tried both /USER:user and /USER:server\user.

The server is a standalone server (2003), the client running the script is a domain-member (xp).

Is there anyway to get around this?

Thanks in advance.


Best regards,
Vikers

Top
#198556 - 2010-05-06 01:56 PM Re: Tokenized script - USE command ignores parameters: error 1326 [Re: Vikers]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Two nearly identical posts from different logins - spooky.

I'll give the same reply then:

Interesting... I have an idea - try assigning the username and password to variables:

 Code:
IF INGROUP("Group_name")
   $USERNAME="Server_name\User_name"
   $PASSWORD="Password"
   USE k: "\\Server_name\Share_name" /USER:$USERNAME /PASSWORD:$PASSWORD
ENDIF

Top
#198557 - 2010-05-06 02:26 PM Re: Tokenized script - USE command ignores parameters: error 1326 [Re: Richard H.]
Vikers Offline
Just in Town

Registered: 2010-05-06
Posts: 2
Loc: Norway
Yes, we are working on the same problem. Didn't know about each others posting. Sorry about that. If you like to delete one of the posts thats ok by me.

Assigning username/password to variables works. Thank you very much.

Top
#198560 - 2010-05-06 03:16 PM Re: Tokenized script - USE command ignores parameters: error 1326 [Re: Vikers]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Great, I suspect that the problem is that when the script is tokenized it mangles the username and password because they are un-quoted text. Putting them in variables protects them.

Putting the username and password in quotes (") might also work.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.152 seconds in which 0.124 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org