[jcifs] HELP: Question about accessing Named Pipes

Michael B Allen mba2000 at ioplex.com
Mon May 16 21:54:01 GMT 2005


Amlan Chatterjee said:
> Hi
> I am facing the following 2 problems accessing named pipes using jcifs.
> Any
> help
> will be much appreciated.
>
> Case 1.
> a) I created a named pipe using C:\> createnp \\.\pipe\foo /M 0x03 /P 0x06
> I used callnp to connect to it and the createnp program exits saying
> "Success: operation performed successfully". However the callnp says
> "Error: CallNamedPipe operation failed: 87"

I think this might be a bug.

> b) Anyway, once the pipe is created I am trying to access it using the
> following code
>
<snip>
> Result: I always get jcifs.smb.SmbAuthException: Logon failure: unknown
> user
> name or bad password.

Well authentication really doesn't have anything to do with named pipes so
I think the error is probably real (meaning there's no such user or the
password is actually bad).

> The user and pass I provide are valid windows xp user names and passwords
> with admin privilages.
> If I use the SMB url as smb://WORKGROUP\\;user:pass@mypc/IPC$/PIPE/foo it
> still gives the same
> exact error.

Well this is definately going to give you an error because the '\\' in
there is invalid. See the Overview page of the API documentation for
proper SMB URL usage.

> Any ideas about what am I missing ?

Reading the documentation?

> Case 2:
> a) Created a named pipe on an UNIX (RH9) machine logging in as a regular
> user using
> % mkfifo -M 666 foo
> b) Added
> nt pipe support = yes
> ntlm auth = yes
> to smb.conf and restarted.
> c) Using the same code as above to access this pipe with the following
> changes to the URL
> smb://domain.com\\;user:pass@servername/IPC$/foo
> In this case I get
>  Exception in thread "main" jcifs.smb.SmbException: The system cannot find
> the file specified.

I don't know anything about named pipes in Samba but I just tried the pipe
examples and they just don't work like they used to. At least with XP they
don't. I'll look into it.

Mike

PS: Note the Jarapac examples *do* work. I guess I broke regular pipes
making the DCE pipes work.


More information about the jcifs mailing list