STATUS_BAD_DEVICE_TYPE why?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

STATUS_BAD_DEVICE_TYPE why?

Erdei Bela
Hy All!

I have a question. What can cause this problem? Every time when i try to
connect to w2k share i got the following error: STATUS_BAD_DEVICE_TYPE.
What does it mean? How and where can i solve this problem? In linux box
or on the w2k machine?
Here is the tethereal dump:

greet
bela

[root@box root]# tethereal -R " ( smb or nbns or tcp.port == 135 or
tcp.port == 136 or tcp.port == 137 or tcp.port == 138 or tcp.port == 139
or tcp.port == 445 or udp.port == 135 or udp.port == 136 or udp.port ==
137 or udp.port == 138 or udp.port == 139 or udp.port == 445 ) and
ip.addr == 192.168.70.12 "
Capturing on eth0
  7.576935 192.168.70.9 -> 192.168.70.12 TCP 37314 > netbios-ssn [SYN]
Seq=3343670681 Ack=0 Win=5840 Len=0 MSS=1460 TSV=78893616 TSER=0 WS=0
  7.577040 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37314 [SYN,
ACK] Seq=3558249390 Ack=3343670682 Win=65535 Len=0 MSS=1460 WS=0 TSV=0
TSER=0
  7.577060 192.168.70.9 -> 192.168.70.12 TCP 37314 > netbios-ssn [ACK]
Seq=3343670682 Ack=3558249391 Win=5840 Len=0 TSV=78893616 TSER=0
  7.578280 192.168.70.9 -> 192.168.70.12 NBSS Session request, to
IS~SGA<00><00><00><00><00><00><00><00><00><20> from FIXSMSC<00>
  7.578392 192.168.70.12 -> 192.168.70.9 NBSS Negative session response,
Called name not present
  7.578755 192.168.70.9 -> 192.168.70.12 TCP 37314 > netbios-ssn [FIN,
ACK] Seq=3343670754 Ack=3558249397 Win=5840 Len=0 TSV=78893616 TSER=49260
  7.578839 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37314 [ACK]
Seq=3558249397 Ack=3343670755 Win=65463 Len=0 TSV=49260 TSER=78893616
  7.579462 192.168.70.9 -> 192.168.70.12 TCP 37315 > netbios-ssn [SYN]
Seq=3341925507 Ack=0 Win=5840 Len=0 MSS=1460 TSV=78893616 TSER=0 WS=0
  7.579555 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37315 [SYN,
ACK] Seq=3558289598 Ack=3341925508 Win=65535 Len=0 MSS=1460 WS=0 TSV=0
TSER=0
  7.579571 192.168.70.9 -> 192.168.70.12 TCP 37315 > netbios-ssn [ACK]
Seq=3341925508 Ack=3558289599 Win=5840 Len=0 TSV=78893616 TSER=0
  7.580471 192.168.70.9 -> 192.168.70.12 NBSS Session request, to
*SMBSERVER<20> from FIXSMSC<00>
  7.580584 192.168.70.12 -> 192.168.70.9 NBSS Positive session response
  7.580599 192.168.70.9 -> 192.168.70.12 TCP 37315 > netbios-ssn [ACK]
Seq=3341925580 Ack=3558289603 Win=5840 Len=0 TSV=78893616 TSER=49260
  7.581068 192.168.70.9 -> 192.168.70.12 SMB Negotiate Protocol Request
  7.581192 192.168.70.12 -> 192.168.70.9 SMB Negotiate Protocol Response
  7.584248 192.168.70.9 -> 192.168.70.12 SMB Session Setup AndX Request,
User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
  7.585060 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE
  7.622146 192.168.70.9 -> 192.168.70.12 TCP 37315 > netbios-ssn [ACK]
Seq=3341925879 Ack=3558289854 Win=5840 Len=0 TSV=78893621 TSER=49260


428.873516 192.168.70.9 -> 192.168.70.12 TCP 37317 > netbios-ssn [SYN]
Seq=3784597166 Ack=0 Win=5840 Len=0 MSS=1460 TSV=78935746 TSER=0 WS=0
428.873741 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37317 [SYN,
ACK] Seq=3654627425 Ack=3784597167 Win=65535 Len=0 MSS=1460 WS=0 TSV=0
TSER=0
428.873758 192.168.70.9 -> 192.168.70.12 TCP 37317 > netbios-ssn [ACK]
Seq=3784597167 Ack=3654627426 Win=5840 Len=0 TSV=78935746 TSER=0
428.874899 192.168.70.9 -> 192.168.70.12 NBSS Session request, to
IS~SGA<00><00><00><00><00><00><00><00><00><20> from FIXSMSC<00>
428.875010 192.168.70.12 -> 192.168.70.9 NBSS Negative session response,
Called name not present
428.875379 192.168.70.9 -> 192.168.70.12 TCP 37317 > netbios-ssn [FIN,
ACK] Seq=3784597239 Ack=3654627432 Win=5840 Len=0 TSV=78935746 TSER=53473
428.875462 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37317 [ACK]
Seq=3654627432 Ack=3784597240 Win=65463 Len=0 TSV=53473 TSER=78935746
428.876105 192.168.70.9 -> 192.168.70.12 TCP 37318 > netbios-ssn [SYN]
Seq=3791620352 Ack=0 Win=5840 Len=0 MSS=1460 TSV=78935746 TSER=0 WS=0
428.876198 192.168.70.12 -> 192.168.70.9 TCP netbios-ssn > 37318 [SYN,
ACK] Seq=3654662804 Ack=3791620353 Win=65535 Len=0 MSS=1460 WS=0 TSV=0
TSER=0
428.876216 192.168.70.9 -> 192.168.70.12 TCP 37318 > netbios-ssn [ACK]
Seq=3791620353 Ack=3654662805 Win=5840 Len=0 TSV=78935746 TSER=0
428.877148 192.168.70.9 -> 192.168.70.12 NBSS Session request, to
*SMBSERVER<20> from FIXSMSC<00>
428.877260 192.168.70.12 -> 192.168.70.9 NBSS Positive session response
428.877275 192.168.70.9 -> 192.168.70.12 TCP 37318 > netbios-ssn [ACK]
Seq=3791620425 Ack=3654662809 Win=5840 Len=0 TSV=78935746 TSER=53473
428.877759 192.168.70.9 -> 192.168.70.12 SMB Negotiate Protocol Request
428.877885 192.168.70.12 -> 192.168.70.9 SMB Negotiate Protocol Response
428.880999 192.168.70.9 -> 192.168.70.12 SMB Session Setup AndX Request,
User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
428.881915 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE
428.918098 192.168.70.9 -> 192.168.70.12 TCP 37318 > netbios-ssn [ACK]
Seq=3791620724 Ack=3654663060 Win=5840 Len=0 TSV=78935751 TSER=53473


Reply | Threaded
Open this post in threaded view
|

Re: STATUS_BAD_DEVICE_TYPE why?

Michael B Allen-4
On Thu, 05 Jan 2006 18:45:52 +0100
Erdei Bela <[hidden email]> wrote:

> Hy All!
>
> I have a question. What can cause this problem? Every time when i try to
> connect to w2k share i got the following error: STATUS_BAD_DEVICE_TYPE.
> What does it mean? How and where can i solve this problem? In linux box
> or on the w2k machine?
> Here is the tethereal dump:
>
> greet
> bela
>
> User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
>   7.585060 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
> Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE

Could it be that there are Unicode characters in the share name? A tree
connect should still work but note that listing shares with Unicode does
not work. Try setting jcifs.encoding=Cp850. If the server is Samba you
might get a better result. Otherwise you might see what's going on if
you get a packet capture.

Mike
Reply | Threaded
Open this post in threaded view
|

Re: STATUS_BAD_DEVICE_TYPE why?

Erdei Bela
Michael B Allen wrote:

>On Thu, 05 Jan 2006 18:45:52 +0100
>Erdei Bela <[hidden email]> wrote:
>
>  
>
>>Hy All!
>>
>>I have a question. What can cause this problem? Every time when i try to
>>connect to w2k share i got the following error: STATUS_BAD_DEVICE_TYPE.
>>What does it mean? How and where can i solve this problem? In linux box
>>or on the w2k machine?
>>Here is the tethereal dump:
>>
>>greet
>>bela
>>
>>User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
>>  7.585060 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
>>Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE
>>    
>>
>
>Could it be that there are Unicode characters in the share name? A tree
>connect should still work but note that listing shares with Unicode does
>not work. Try setting jcifs.encoding=Cp850. If the server is Samba you
>might get a better result. Otherwise you might see what's going on if
>you get a packet capture.
>
>Mike
>
>
>  
>
No Unicode characters in the share name, just simple ascii chars. Here
is jcifs url:  smb://admin:pass@sga/sga/. It is very simple, i think. I
think the problem is in the w2k machine.
Can i change some property in w2k? Do you know? Because i don't have idea.
What does it mean: Path: \\IS~SGA. It is good? Why not this: Path:
\\sga\sga ?
I don't understand, bacause the java program can connect to more another
machine with same OS.
It is mystical.

bela
Reply | Threaded
Open this post in threaded view
|

Re: STATUS_BAD_DEVICE_TYPE why?

Michael B Allen-4
On Thu, 05 Jan 2006 23:50:36 +0100
Erdei Bela <[hidden email]> wrote:

> >>User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
> >>  7.585060 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
> >>Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE
> >
> No Unicode characters in the share name, just simple ascii chars. Here
> is jcifs url:  smb://admin:pass@sga/sga/. It is very simple, i think. I
> think the problem is in the w2k machine.
> Can i change some property in w2k? Do you know? Because i don't have idea.
> What does it mean: Path: \\IS~SGA. It is good? Why not this: Path:
> \\sga\sga ?

Yeah, the TreeConnect path is getting messed up for some reason. Are
there any strange characters in the password? If so you will need to
URL escape them. Try separating out the credentials like:

  NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username", "password");
  SmbFile f = new SmbFile("smb://sga/sga/", auth);

Mike
Reply | Threaded
Open this post in threaded view
|

Re: STATUS_BAD_DEVICE_TYPE why?

Erdei Bela
Michael B Allen wrote:

>On Thu, 05 Jan 2006 23:50:36 +0100
>Erdei Bela <[hidden email]> wrote:
>
>  
>
>>>>User: WORKGROUP\administrator; Tree Connect AndX, Path: \\IS~SGA
>>>> 7.585060 192.168.70.12 -> 192.168.70.9 SMB Session Setup AndX
>>>>Response; Tree Connect AndX, Error: STATUS_BAD_DEVICE_TYPE
>>>>        
>>>>
>>No Unicode characters in the share name, just simple ascii chars. Here
>>is jcifs url:  smb://admin:pass@sga/sga/. It is very simple, i think. I
>>think the problem is in the w2k machine.
>>Can i change some property in w2k? Do you know? Because i don't have idea.
>>What does it mean: Path: \\IS~SGA. It is good? Why not this: Path:
>>\\sga\sga ?
>>    
>>
>
>Yeah, the TreeConnect path is getting messed up for some reason. Are
>there any strange characters in the password? If so you will need to
>URL escape them. Try separating out the credentials like:
>
>  NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username", "password");
>  SmbFile f = new SmbFile("smb://sga/sga/", auth);
>
>Mike
>
>
>  
>
Hm... No, nothing special char in the password too. Just simple chars,
maybe i try to separate the connection, but just tomorow. But i have
another strange behavior. I try to mount the w2k share with simple samba
mount (mount -t smbfs //sga/sga /mnt -o
username=administrator,password=pass) , and i got response: no such
share. And the another w2k machine can connect to share. Linux can't.

bela