Re: Authentication scripting
Re: Authentication scripting
- Subject: Re: Authentication scripting
- From: Jeremy Reichman <email@hidden>
- Date: Fri, 18 Jul 2008 10:00:01 -0400
- Thread-topic: Authentication scripting
On 7/14/2008 7:48:30 PM, "Yash" <email@hidden> wrote:
> I am trying to automate installation of a software on Leopard. The
> user authentication panel for admin is one spot I am hitting road block.
>
> Has any one figured out a way to send keystroke(username/password)
> to the authentication window.
I agree that this is probably not a good idea. At the very least, you'd be
storing an important admin password in a script or somewhere else accessible
by a script. In contrast, the system stores login passwords in a secure
manner and does so for a reason. If you're taking this step to automate
installations on multiple computers, then that multiplies the security
problem you're creating.
Since I don't know the reason why you're trying to automate the installation
of software on Leopard, let me take a step back and suggest the use of the
"installer" shell command. It has a man(ual) page that explains its
operation. It has gotten significantly more involved in Leopard, but at the
minimum, you can run:
$ installer -pkg OSInstall.mpkg -target /
... which installs the package "OSInstall.mpkg" on the startup disk ("/").
But this will fail if the package requires more privileges than your current
user account.
The installer tool can be called by "sudo" (which itself needs credentials)
or can be run by the root user if you have another way that runs commands
with privileges (ARD, launchd, cron, etc. etc. etc.). This can all be done
from the command line or wrapped into scripts -- including shell, Python,
Perl, etc.
$ sudo installer -pkg OSInstall.mpkg -target /
If the installer package requires admin or root privileges, running
"installer" with sudo should bypass further Authentication Services dialogs.
The "installer" command line tool is, in effect, used by software delivery
tools that distribute packages to managed Macs. I know it is used by both
LANdesk's and Altiris' products, for example, and it's likely used by any
similar tool that distributes and installs Apple software packages.
Since knowing your real purpose would be helpful in answer the question
better, it would be helpful if you could explain more about what you're
trying to accomplish. Are you trying to create a disk image to deploy new
computers? Are you trying to push software out to computers that are already
set up and running? Something else?
Are you creating the installer yourself (and thus have control over how the
installer package is constructed), or are you using third-party software
installers?
--
Jeremy Reichman
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden