Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Network Authentication

Thread view: 
Marco Roda - 05 Oct 2005 08:24 GMT
Hi,

I need to access a network resource that requires authentication
(user/password): typically when I access through Windows Explore the network
shared folder:
\\<server>\<shared_folder>
I am required to supply username and password.
How to implement it in Java code and supply the information required?

Thank you,
Marco
Abhijat Vatsyayan - 05 Oct 2005 09:32 GMT
You might want to try executing (Runtime.exec ) a  command like this  -

"net use \\server\shared-folder  password /USER:username "  before
trying to access any files on this folder.
So if the server name is "myserver.mycomp.com" , shared folder name is
"net-share", user name is "marco" and password is "marco123", this
command will look like -
net use \\myserver.mycomp.com\net-share  marco123  /USER:marco

Note that this will make "net-share" accessible on the computer to other
processes as well and any user working on the computer will be able to
get to this share without providing user id and password.

Are you sure that you need to access your files this way though? What
about using some other network protocols for accessing this network
resource ?

Abhijat

> Hi,
>
[quoted text clipped - 7 lines]
> Thank you,
> Marco
Marco Roda - 05 Oct 2005 12:53 GMT
Thank you,

That should work, but I think it is not the right way, as you said.
Currently I am trying using Perl NetResource module...
Marco

> You might want to try executing (Runtime.exec ) a  command like this  -
>
[quoted text clipped - 26 lines]
> > Thank you,
> > Marco
Rogan Dawes - 05 Oct 2005 13:08 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> Thank you,
> Marco

This is a very vague request, but if I understand what you are asking
correctly, you may be able to achieve what you are after using jcifs.

Google for it.

Rogan
Manfred Rosenboom - 06 Oct 2005 08:52 GMT
Have a look at

http://www.norbert.hranitzky.com/jcifs/jcifs.htm

and then next to

http://jcifs.samba.org/
Roedy Green - 07 Oct 2005 12:13 GMT
>I need to access a network resource that requires authentication

see http://mindprod.com/jgloss/authentication.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.