Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 11-11-2008, 06:44 PM   #41
tlarkin
League Commissioner
 
Join Date: Mar 2003
Location: Bay Area, CA
Posts: 11,352
you forgot having kids

sudo rm -rf /bank_account
__________________
sudo make me a sammich
tlarkin is offline   Reply With Quote
Old 11-17-2008, 11:12 PM   #42
sardion
Registered User
 
Join Date: Nov 2008
Posts: 5
Its a security issue

OS X (correctly) won't let you trigger things to be run as root when a user logs in (think about it and you'll see why this is in general a bad idea).

That said, there is a workaround. You can add the script to the sudoers file and mark it to be runnable via sudo by everyone without a password. Then in the launchdaemon plist call "/usr/bin/sudo /path/to/script".

This will work, but will allow anyone to run the script whenever they feel like it which is a security hole (but probably a manageable one since it sounds like you control this network).

I don't like this plan, but if you need to run things with root privs on login it will work.

I can't recall the sudoers synatx off hand but googleing should find it.
sardion is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.