[jcifs] No Access Exception Question

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Fri Jul 12 09:13:05 EST 2002


This is very strange Yibo. I've ran the test against NT successfully without a domain
parameter. I know other people are using named pipes successfully. I just ran it on XP two
minutes ago just fine:

$ java CallNamedPipe smb://mydom\;miallen:mypass@172.24.10.33/IPC$/pipe/foo out in
writing 25 bytes
read 25 bytes

Can you connect to that host with smbclient? Can you use jCIFS in other ways using the
same credentials to just access a file? The only course of action here is to start looking at
packet traces. Do you have network monitor or ethereal? Can you send me a packet capture
(pcap) of the failing CallNamedPipe example connecting to createnp.exe \\.\pipe\foo /P 0x6?

> -----Original Message-----
> From:	Yibo Dong [SMTP:ydong at mail.arc.nasa.gov]
> Sent:	Thursday, July 11, 2002 6:48 PM
> To:	Allen, Michael B (RSCH)
> Cc:	Brian Johnson; jcifs at samba.org; ahitzeman at mail.arc.nasa.gov; robert at intrinsyx.com; bmortimer at mail.arc.nasa.gov
> Subject:	RE: [jcifs] No Access Exception Question
> 
> Hi, Mike,
> 
> I just tested jcifs on an NT machine and got the same Invalid Parameter
> error. It looks like that we can tentatively eliminate the possibility
> of a platform specific error. I also tried the property file with domain
> name being blank, with domain name entry being completely absent, it
> didn't make any difference. Is domain a required parameter? The
> comments and examples in SmbFile.java don't seem to say so.
> 
> Other than the following smb url
> 
> smb://domain;username:password@server/IPC$/pipe/name
> 
> what other setups for the server that I should go through, such as DNS,
> WINS, etc., and specify them in the property file? Any other
> configurations I haven't mentioned that I need to examine? In the example
> jcifs.prp, the resolveOrder(=WINS) seems to be commented out by the
> semicolon, is it true?
> 
> Thanks,
> 
> -Yibo
> 
> 
> -----Original Message-----
> From: Allen, Michael B (RSCH) [mailto:Michael_B_Allen at ml.com]
> Sent: Tuesday, July 09, 2002 3:30 PM
> To: 'Yibo Dong'
> Cc: Brian Johnson; jcifs at samba.org; ahitzeman at mail.arc.nasa.gov;
> robert at intrinsyx.com; bmortimer at mail.arc.nasa.gov
> Subject: RE: [jcifs] No Access Exception Question
> 
> 
> 
> 
> > -----Original Message-----
> > From:	Yibo Dong [SMTP:ydong at mail.arc.nasa.gov]
> > Sent:	Tuesday, July 09, 2002 5:27 PM
> > To:	Michael B. Allen
> > Cc:	Brian Johnson; jcifs at samba.org; ahitzeman at mail.arc.nasa.gov;
> robert at intrinsyx.com; bmortimer at mail.arc.nasa.gov
> > Subject:	RE: [jcifs] No Access Exception Question
> >
> > 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 */
> >
> 	I think this will make your domain an empty string. Not sure what will
> happen in
> 	that scenario.
> 
> > 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.
> >
> 	Wierd. Could be a strange interaction with Win2K. What happens if you
> simply do not
> 	specify a domain. So you do not authenticate against a domain or the target
> machine
> 	is not a member of a domain?
> 
> > 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.
> >
> 	That's just crappy handling of named pipes on Windoze. If the named pipe
> using program
> 	exits without releasing the handle it can become a zombie. You don't have
> to reboot
> 	though. Just go into Control Panel > Services and restart the Server
> Service.
> 
> 	Someone just installed an XP machine nearby. I'll try it with that when I
> get a chance. Try
> 	it against NT 4.0 just so you can rule out a configuration/usage issue.
> 
> > 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