[jcifs] RE: NT Domain Authentication Only (Steve Springett)

Zalewski, Michael J (Michael)** CTR ** mjzalewski at lucent.com
Tue Jun 25 00:21:57 EST 2002


Here is the way I do it.

1)	Create a file or a directory, with access rights 'Readable by all Authenticated Users'. It does not have to be on a share point, but must be accessible only by authenticated users.
2)	Make the properly formed Samba URL to access the file, from the user's NT Account and password.
3)	Access the URL. You don't have to read anything.

		SmbFile filTest = new SmbFile( sSmbUrl.toString());
		filTest.exists();

The above throws an SmbException if the user cannot access the file, but passes through if the user and password used to form the URL are correct. SmbFile.exists() returns a boolean but I don't care about it. I already know the file exists. I just want to see if the URL made up of a user's account and password would have access to the file.





More information about the jcifs mailing list