Date: Thu, 12 Jun 2003 19:17:00 +0200 From: Dean Strik <dean@stack.nl> To: "PsYxAkIaS (FreeBSD)" <freebsd@psyxakias.com> Cc: freebsd-isp@freebsd.org Subject: Re: cannot reboot from a script ran by root's crontab Message-ID: <20030612171700.GA64585@dragon.stack.nl> In-Reply-To: <000a01c33105$8e4e4ec0$152ea8c0@computer> References: <000a01c33105$8e4e4ec0$152ea8c0@computer>
next in thread | previous in thread | raw e-mail | index | archive | help
PsYxAkIaS (FreeBSD) wrote: > Hello > > $ cat /usr/sbin/checkre > #!/bin/bash You have a /bin/bash? Use /bin/sh instad. > mkdir /tmp/reboot > reboot now > $ crontab -l 0,5,10,15,20,25,30,35,40,45,50,55 * * * * > /usr/sbin/checkre >/dev/null 2>&1 > > $ whoami root > > when the time comes, it makes the directory /tmp/reboot but it doesnt > 'reboot now'. > > > Is this a security issue that forbids FreeBSD to reboot from a script > running by root's crontab? if yes, how can i bypass it? The reboot binary is in /sbin. Which is not in your PATH. Either set PATH in the crontab, or edit the checkre script to use /sbin/reboot instead. Root should have the errors in it's mail btw... -- Dean C. Strik Eindhoven University of Technology dean@stack.nl | dean@ipnet6.org | http://www.ipnet6.org/ "This isn't right. This isn't even wrong." -- Wolfgang Pauli
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030612171700.GA64585>