Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Run software update in non-admin account?

I did some searching through past posts, but the most recent one I found was several years old.


Is there any way to run Software Update automatically in a non-admin account? I run in a non-admin account unless there's some task that really needs admin privileges to complete, for security purposes, but having Software Update not run automatically is rather suboptimal for security.


So, is there any way to get Software Update to check for updates automatically from a non-admin account? (I'm not averse to using the crontab or launchd, if necessary—I've never done it before, but given instructions, I'm sure I could figure it out.


Thanks in advance!

MacBook Pro, Mac OS X (10.6.7), 256 GB SSD, 2.2 GHz Intel Core i7

Posted on May 31, 2011 4:13 PM

Reply
31 replies

Jun 8, 2011 5:51 AM in response to ds store

Lingon is free here and it works in Snow Leopard still

The version of Lingon in that download (v1.2) was released in 2006. There was a later free version, but then the developer stopped working on it. He has now resumed its development, and in my view $4.99 for the new version is a bargain that helps support this.

See

http://www.peterborgapps.com/2011/01/im-back/

http://sometimesitmatters.com/post/6172073266/thinking-about-lingon-3

Jun 8, 2011 11:17 AM in response to Király

So, as it turns out, the applescript had a bug or two in it. (Note: to get this to work, I added "josh ALL=(ALL) NOPASSWD: /usr/sbin/softwareupdate" to my sudoers file.)

Here's a fixed version that I'm hoping will work:


set theList to every paragraph of (do shell script "sudo softwareupdate -l")

set updates to ""

repeat with anItem in theList

if anItem starts with " * " then

if updates is not "" then

set updates to updates & return

end if

set updates to updates & (characters 6 thru -1 of anItem)

end if

end repeat

if updates is not "" then

tell application "Finder"

ignoring application responses

display dialog "Software Update available:" & return & updates with title "Software Update available" buttons "OK" default button 1 with icon file ":System:Library:CoreServices:Software Update.app:Contents:Resources:Software Update.icns"

end ignoring

end tell

end if

Jun 10, 2011 8:07 PM in response to Király

No, it hasn't worked for me, either, which is very strange, given that if I run the Applescript independently it works, and that the task is scheduled in launchd. My only thought now is that perhaps it's somehow not running as me, and that I should change the "josh" in the sudoers file to ALL, but I'm not sure that that makes any sense.

Jun 11, 2011 9:35 AM in response to joshz

Hmm…I'm now getting a bunch of these errors in Console when it (sudo softwareupdate -l) runs:
6/11/11 12:30:47 PM Software Update[470] Package Authoring: my.result.title and my.result.message not defined or empty


The correct output is still printed to the Terminal, but the Applescript seems to not be working.


Thoughts?


Message was edited by: joshz

Jun 11, 2011 10:15 AM in response to Király

I know. It *was* working for me, but it suddenly stopped working and now softwareupdate throws the error I mentioned above when I run it.


As for the ~, sorry about that. I had hardcoded in a path for the Applescript and put it in its own file—that's what I was referring to.


EDIT: Software Update threw the same error this morning when I ran it successfully, so that can't be the problem. Odd.

Run software update in non-admin account?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.