Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Root password needed?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Root password needed?
Authored by: porkchop_d_clown on May 31, '03 02:24:47PM

Ummmm... cron jobs are already run as root, and diskutil is a command line version of the disk utilitiy. Applescript isn't needed.

The only real problem with cron is you have to leave your machine running 24 hours a day, which is why I use anacron instead.

---
Everyone loves a clown, but no one will lend him money!



[ Reply to This | # ]
Root password needed?
Authored by: Alrescha on May 31, '03 05:30:03PM

"Ummmm... cron jobs are already run as root.."

Unless Darwin/OS X acts differently than all other unixes that I have experienced, cron jobs run as the user who added them. This is not necessarily root.

A.



[ Reply to This | # ]
Root password needed?
Authored by: MacTed on May 31, '03 09:39:57PM

First, you don't need to set up the Root password -- just sudo, and use your regular password to authenticate as an Administrator.

Second, you can write a brief shell script to run the necessary commands, and sudo cron to make it all come out right....

Be seeing you,

Ted

---
Support Consultant - Mac Specialist, OpenLink Software

[ Reply to This | # ]

Root password needed?
Authored by: greed on Jun 02, '03 10:36:03AM

And you can always add something like:

username ALL=(root) NOPASSWD:/usr/sbin/diskutil

to your "sudoers" file. (See visudo and sudoers manpages for more fun. I mean detail.)

Then you can "sudo diskutil" when logged in as "username" without having to enter the password.



[ Reply to This | # ]