epoch1970;431774 Wrote:
> No prob.
> shutdown -s is complete news to me. In fact, it is not in the man pages
> of my mac... But I tried, it works.
>
> Question: how do you modify sudoers on the mac? I went the daemon route
> because of this.
The sanctioned way:
Code:
--------------------
sudo visudo
--------------------
What would you guess would be the percentage of Mac users who remember
the vi editor commands? 00.001% ?
An easier way:
Code:
--------------------
sudo nano /etc/sudoers
--------------------
..but unfortunately, unlike visudo, no error checking gets done on the
attempted /etc/sudoers edits...and you can break your sudoers file
pretty easily this way.
The totally-non-sanctioned way, and what I do in the setup script:
sudo osx-setup-script.sh $USER
Code:
--------------------
#!/bin/sh
scuser=$1
cp --force /etc/sudoers /etc/sudoers.bak
echo "$scuser ALL=NOPASSWD:/sbin/shutdown*" >>/etc/sudoers
echo "$scuser ALL=NOPASSWD:/usr/bin/pmset*" >>/etc/sudoers
echo "$scuser ALL=NOPASSWD:/usr/local/sbin/spc-sleep.sh" >>/etc/sudoers
echo "$scuser ALL=NOPASSWD:/usr/local/sbin/spc-hibernate.sh" >>/etc/sudoers
echo "$scuser ALL=NOPASSWD:/usr/local/sbin/spc-wakeup.sh*" >>/etc/sudoers
--------------------
The /etc/sudoers.bak file is made because, if you hose your sudoers
file on OSX, I haven't found an easy way to repair it other than by
enabling the root account. This I learned by experience.
Also, obviously, for this to work, the user MUST run this setup script
under the same account in which they were logged in when they setup
SqueezeCenter. That will probably be 99% of the cases...but I should
probably double-check my documentation to make sure I'm emphasizing this
enough.
--
gharris999
------------------------------------------------------------------------
gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins