From: Dave H. <dhy...@gm...> - 2009-11-24 18:31:23
|
Hi Alex, On Tue, Nov 24, 2009 at 9:21 AM, Alex4 <ale...@ic...> wrote: > > I'm trying to give one user permission to change the IP address of the > gumstix and restart > > Is reboot the only way to set the new ip address in /etc/network/interfaces? > If so, how to give user permission to execute 'reboot' making that user the > root? > > all the file permissions for reboot and halt seem to indicate user should be > able to execute, but system('reboot') doesn't allow user to reboot, > returning message: > > reboot: must be superuser. Normally, you would use the sudo command (or su command) to allow non-root users to do root style things. I haven't used this on the gumstix, but that's how it works on normal linux. su require knowing the root password, sudo doesn't. Also, you should be able to do something like /etc/init.d/network restart to shutdown and startup the network stuff without doing a reboot. Running the /etc/init.d/network script still requires being root. -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ |