Hi guys
I'm doing some Java IO stuff at the moment, which is fine if you are working on a single computer with read/write access to every folder.
Assuming that I want to copy a file to a network folder that is mounted using the guest account, is there any option to open the OS X password dialog that asks for the correct username and password in order to get full access to that ...
The first thing that comes to mind is to exec the authopen command.
http://developer.apple.com/mac/libra...uthopen.1.h tml
I recommend you try it first in a Terminal shell window.
Also, be sure to use the String[] form of exec(), not the single-String form.
Unfortunately I'm absolutely not familiar with the Terminal, especially when it comes to implement such commands in my Java code.
Isn't there a command Apple offers to open that Finder dialog that asks for permission to change the folder?
The "Finder Dialog" is provided by Authorisation Services in OSX. It enables an application to get permission to and then actually perform a privileged action. In a normal OSX app you would just use this. There is no direct Java equivalent as this is platform specific. I would recommend writing a small tool that is OSX native in a native language (like Objective-C) to get access to ...
Authorization Services are normally the "right answer", but in this case the OP wants to get a username and password for a remote system. Escalating to a privileged local account isn't going to buy access to these remote resources. I'm unfamiliar with java gui programming, but i can only assume that there is a form of input that obscures what is being typed with bullets, etc. I would just ...
Ah, yes, I see. I mis-read the original question. Once you get the username and password what are you going to do? Mount manually via a command-line tool?
I finally found it by accident last night at 4am.
Instead of choosing a file/directory using the java.swing JFileChooser, you have to use java.awt FileDialog.
Not only does it look like Apples native dialog, it supports Apples 'connect as...' feature which is exactly what I am looking for.
Thank you anyway for your support. Appreciate it!
I didn't know that.
I am not a subscribed developer yet (free though, but that doesn't really count), so it's pretty hard to get proper information, or do I miss a source on the Apple developers site?
Quote:
Originally Posted by Transporteur
I didn't know that.
I am not a subscribed developer yet (free though, but that doesn't really count), so it's pretty hard to get proper information, or do I miss a source on the Apple developers site?
It's something I remember from way back when people wanted to get ...
Quote: Originally Posted by Transporteur I didn't know that. I am not a subscribed developer yet (free though, but that doesn't really count), so it's pretty hard to get proper information, or do I miss a source on the Apple developers site? It's something I remember from way back when people wanted to get the OSX L&F from Java on the Mac on other platforms and it became clear that Sun couldn't do that as...
Authorization Services are normally the "right answer", but in this case the OP wants to get a username and password for a remote system. Escalating to a privileged local account isn't going to buy access to these remote resources. I'm unfamiliar with java gui programming, but i can only assume that there is a form of input that obscures what is being typed with bullets, etc. I would just get the password in there,...
You can use your own GUI to get a username, password, and (optionally) the domain. You can then pass this information to a Mac utility to mount the drive. Assuming that you are trying to mount a SMB drive (i.e. a Windows mount), you can try something like this: Code: // Mount the drive String[] cmd1 = {"/sbin/mount_smbfs", "//domain;username:password@server/share", "/path/to/dir"}; Process...
Related threads on "Mac Forums - Mac News and Rumor Discussion":
The latest FireFox giveth (saved password dialog stays... The latest FireFox giveth (saved password dialog stays til you know password is correct) and taketh away (click to open saved files - gone).
07:32 PM July 21, 2008
from web
Most of my problems center around authentication delays... Most of my problems center around authentication delays (and as of last night, a lock-up) at the screen saver password dialog.
05:15 AM June 03, 2008
from twitterrific
jaharmi
Jeremy Reichman
Thread profile page for "Finder password dialog with Java" on http://www.macrumors.com.
This report page is a snippet summary view from a single thread "Finder password dialog with Java", located on the Message Board at http://www.macrumors.com.
This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity