Advertisement

11.18.2008 at 05:54PM PST, ID: 23916519 | Points: 125
[x]
Attachment Details

need to use sudo in script

Tags:

apple, os x, 10.5 leopard

I need a simple script that will delete the boot cache file at /private/var/db/BootCache.playlist.

sudo rm /private/var/db/BootCache.playlist works in terminal, but i need to put in the root password.  how can i accomplish in a script without leaving the root password in plain text?

my goal is to put this into a logout hook so the computer doesn't freeze on reboot... i need this script to run as any user.

any help would be great.
 
 
 
Expert Comment by jgiordano:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by jgiordano:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by 97WideGlide:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by omarfarid:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by Tintin:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Author Comment by jhaff:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by 97WideGlide:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by Tintin:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
Expert Comment by 97WideGlide:

All comments and solutions are available to Premium Service Members only. Start your 7-day free trial to view the solution to this question.

Already a member? Login to view this solution.

 
 
20081119-EE-VQP-46 - Hierarchy / EE_QW_2_20070628