[jcifs] credentials while accessing the file on localhost
Michael B Allen
mba2000 at ioplex.com
Mon Mar 1 07:21:39 GMT 2004
Naved Khan said:
> Sorry to continue this thread. I'm not quite getting why I need the
> username/password to access a shared folder on my local machine...why do I
> get "access denied" when I try to access a shared file in the following
> // naved - local machine
> SmbFile smbFile = new SmbFile("smb://naved/shared/test.dat");
> boolean exists = smbFile.exists();
> However I can access the same folder without providing username/password
> either through windows explorer or using net use.
> Is it that we always have to provide the username/password in SmbFile even
> while accessing a local shared folder? Or am I missing something here?
> Please clarify.
JCIFS makes no distinction between a local or remove SMB resource.
If credentials are not supplied the client will use the user "GUEST"
without a password.
Have you tried smb://user:@server, smb://:@server, smb://user@server, ...?
Do you use a username to log into your machine?
What happens if you set your password and use that with JCIFS?
More information about the jcifs