Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials in SMB URL not working #25

Open
micopiira opened this issue Feb 21, 2023 · 0 comments
Open

Credentials in SMB URL not working #25

micopiira opened this issue Feb 21, 2023 · 0 comments

Comments

@micopiira
Copy link

micopiira commented Feb 21, 2023

I tried your library and did not manage to get credentials in url working.

Not working:

try (final DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Path.of(URI.create("smb://user:password@192.168.0.6/test/")))) {
	directoryStream.forEach(System.out::println);
}

Working:

System.setProperty("jcifs.smb.client.username", "user");
System.setProperty("jcifs.smb.client.password", "password");
try (final DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Path.of(URI.create("smb://192.168.0.6/test/")))) {
	directoryStream.forEach(System.out::println);
}

From the README I suppose the first one is supposed to work also?

And version: smb-nio:0.12.0 & jcifs-ng:2.1.9 (also tried jcifs-ng:2.1.8 and smb-nio:0.11.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant