Re: script for system Authentication dialog box.
Re: script for system Authentication dialog box.
- Subject: Re: script for system Authentication dialog box.
- From: Christopher Nebel <email@hidden>
- Date: Wed, 20 Jul 2005 12:52:28 -0700
On Jul 20, 2005, at 9:53 AM, selva.ganesan wrote:
I am using do shell script"sudo mkdir /usr/local/bin" with
administrator
privileges to making dir.System will show u the nice dialogue box
to enter
the administrator password.
In the same way, i am showing dialogue box to enter the password and
passsing into the commands which requires the administrator
password. When
we r entering the password in my dialogue box it is showing the
password
instead of asterisk characters.
In system dialogue box it is showing the characters as asterisk.How
can i
make it in my dialogue box?
Here's an idea: don't. Requesting admin passwords in your own
dialogs is a security hole in at least two different ways, and you
don't particularly need to do it anyway. Authenticating (officially)
once gives you a five-minute window during which you will not need to
authenticate again. For instance, try this:
set x to do shell script "whoami" with administrator privileges
set y to do shell script "whoami" with administrator privileges
{x, y}
Notice that you only have to type in your password once.
--Chris Nebel
AppleScript and Automator Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden