[jcifs] No Access Exception Question

Yibo Dong ydong at mail.arc.nasa.gov
Wed Jul 10 07:26:33 EST 2002


Hi, Mike,

Thanks for checking it for me. No, I am not running on a laptop without
an ethernet card attached. ydong is a desktop machine on our LAN.

I am getting a different error now. Here is what I used:

Server:

createnp \\.\pipe\name

Client:

java CallNamedPipe -Djcifs.properties=jcifs.prp inFile.txt outFile.txt

Jcifs.prp Content:

domain=                  /* left blank since we don't have one */
username=ydong
password=MyPassword
;wins=143.232.153.176    /* IP address for ydong */
wins=143.232.153.176     /* ditto */
;log=ALL
;resolveOrder=WINS
;soTimeout=3000

Error I Am Getting:

jcifs.smb.SmbException: Invalid parameter 	at
jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:628) 	at
jcifs.smb.SmbSession.sendTransaction(SmbSession.java:123) 	at
jcifs.smb.SmbTree.sendTransaction(SmbTree.java:65) 	at
jcifs.smb.SmbFile.sendTransaction(SmbFile.java:456) 	at
jcifs.smb.TransactNamedPipeOutputStream.write(TransactNamedPipeOutputStream.
java:62) 	at CallNamedPipe.main(CallNamedPipe.java:50) Exception in thread
"main"

It's not clear to me which parameter is invalid.

Interestingly, if I re-run the client at this point, I will get an
timeout error saying YDONG/143.232.153.176 is not responding, but if
I try to re-run createnp, I will get a 231 (pipe busy) error. I have to
reboot the machine in order for createnp to work again.

Thanks again for helping me.

-Yibo

-----Original Message-----
From: Michael B. Allen [mailto:miallen at eskimo.com]
Sent: Tuesday, July 09, 2002 12:49 PM
To: Yibo Dong
Cc: bmortimer at mail.arc.nasa.gov; robert at intrinsyx.com;
ahitzeman at mail.arc.nasa.gov; jcifs at samba.org
Subject: Re: [jcifs] No Access Exception Question


On Tue, 9 Jul 2002 11:22:45 -0700
"Yibo Dong" <ydong at mail.arc.nasa.gov> wrote:

>
> Hi, Mike,
>
> Thanks for the quick response.
>
> I have tried all the possible combinations of createnp and client
> calls based on the instructions on
> http://jcifs.samba.org/src/docs/pipes.html
> but still got rather consistent Access Denied errors, albeit at slight
> different locations each time in
> Jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java) call. Please see
> the attached for all the test
> details.
>
> My suspicion is that my configuration/setup for running those tests is
> the culprit. But where?

I  just  went through the CallNamedPipe example and it worked. You know you
will  need  to  supply appropriate authentication creadentials. It's pretty
standard  for  GUEST  to  be  disabled  these  days. If you run the example
without  them  you  indeed  get  AccessDenied (natrually). When you run the
callnp.exe example it works because it uses your creadentials from the LSA.
Try:

  java CreateNamedPipe smb://ydong:mypass@host/IPC$/pipe/foo input output

Or use -Djcifs.properties=jcifs.prp and make a jcifs.prp with
username=ydong, password=mypass, ...etc.

If this is not your problem then there might be a Win2K specific issue. Are
you using a Laptop without an ethernet cable attached?

>
> Any insights will be greatly appreciated.
>
> -Yibo
>
> P.S. I wonder if /P 0x5 you mentioned should have been /P 0x6?

Right, /P 0x6.

>
>
> -----Original Message-----
> From: Michael B. Allen [mailto:miallen at eskimo.com]
> Sent: Monday, July 08, 2002 11:22 AM
> To: Yibo Dong
> Cc: jcifs at samba.org
> Subject: Re: [jcifs] No Access Exception Question
>
>
> On Mon, 8 Jul 2002 10:01:53 -0700
> "Yibo Dong" <ydong at mail.arc.nasa.gov> wrote:
>
> >
> > Hi,
> >
> > I have downloaded your jcifs package and are using the following pair in
> > a Windows 2000 environment (machine name: ydong, domain name: not used,
> > group name: CDS) to test:
> >
> > createnp \\.\pipe\name
> >
> > CallNamedPipe smb://ydong/IPC$/PIPE/name c:\JCIFSTest\pipes\inFile.txt
> > c:\JCIFSTest\pipes\outFile.txt
> >
> > The call "out.write( b, 0, n )" in CalledNamedPipe.java results in the
> > following access exception:
> >
> > jcifs.smb.SmbAuthException: Access denied 	at
> > jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:626) 	at
> > jcifs.smb.SmbSession.sendTransaction(SmbSession.java:123) 	at
> > jcifs.smb.SmbTree.sendTransaction(SmbTree.java:65) 	at
> > jcifs.smb.SmbFile.sendTransaction(SmbFile.java:456) 	at
> >
>
jcifs.smb.TransactNamedPipeOutputStream.write(TransactNamedPipeOutputStream.
> > java:62) 	at CallNamedPipe.main(CallNamedPipe.java:44) Exception in
thread
> > "main"
>
> With  the  CallNamedPipe  example  you  have  to  use the /P 0x5 flags
with
> creatnp. That might help. See this page for complete instructions on how
to
> run those examples:
>
>   http://jcifs.samba.org/src/docs/pipes.html
>
> Also,  just  a  note, the available() method of the InputStream returned
by
> SmbNamedPipe.getNamedPipeInputStream  is  not  implemented.  This  might
be
> necessary for certain types of I/O. It is very high on my todo list
though.
>
> Mike
>
> --
> http://www.eskimo.com/~miallen/c/jus.c
>


--
http://www.eskimo.com/~miallen/c/jus.c





More information about the jcifs mailing list