[jcifs] Java newbie- trying to access a windows public share

Michael B Allen mba2000 at ioplex.com
Tue Mar 27 16:02:19 GMT 2007

On Tue, 27 Mar 2007 09:06:34 -0400
"Smith, Mike" <Mike_Smith at RGCResources.com> wrote:

> I am confused about the credentials piece   
> This is a public share and I don't use a user profile/pwd to access this
> directory/file.  
> DO I still need to pass credentials.   As I understand it, there are
> none for this file.

There are always credentials. The default is 'GUEST' with a blank
password. If that is what you mean by 'public' then yes, it should work
without specifying the jcifs.smb.client.{domain,username,password}.

> You will need to specify the credentials used to access the file; you
> probably want to add something like:
> jcifs.Config.setProperty("jcifs.smb.client.domain", "NTDOMAIN");
> jcifs.Config.setProperty("jcifs.smb.client.username", "myusername");
> jcifs.Config.setProperty("jcifs.smb.client.password", "mypassword");

Michael B Allen
PHP Active Directory Kerberos SSO

More information about the jcifs mailing list