On 8/11/2013 2:53 AM, Chris Morley wrote:
> It seems the only way to have shutdown not require the user to enter the 
> password,
> would be to call a script with admin rights.
> 
> I am wondering if this is something we could add to linuxcnc's make file to 
> add this script and
> setuid it for admin rights.
> I'd hate to add a button to Gscreen that require the integrator to have to 
> add a guru script to
> make it work (even if it is fairly easy).
> 
> reference link
> http://stackoverflow.com/questions/8089471/remotely-shutdown-restart-a-linux-machine-without-password

As indicated in your reference link, setup an sudoers entry that allows
the user in question to run the shutdown command and it will work (and
be reasonably safe).  Configure sudoers for NOPASSWD for this entry if
you don't want to be prompted for the root password.

If you want to add something to the LinuxCNC make file, a simple C
program that executes the shutdown command would be fairly simple to
write.  It could be setuid to run as root by the same "sudo make setuid"
process as the other LinuxCNC commands that need root permissions.

-- 
Charles Steinkuehler
[email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to