Re: power down with cron does not work

From: nosy (narrischesschwammerl_at_yahoo.de)
Date: 10/14/03


Date: Tue, 14 Oct 2003 08:27:16 GMT

anc <anc@nospam.net> schrieb:

>nosy wrote:
>
>> Hi,
>> I tried many things to power down my server at a certain time.
>> I use SuSe 8.1. What I did was:
>>
>> as a root changed to /root
>> created a file called crontab.txt
>> there I put
>> 0 1 * * * cp -upR / data / backup; poweroff
>>
>> saved it
>> and executed crontab crontab.txt
>
>Poweroff is a symbolic link to the halt command:-
>
>anc@linux:~> ls -l /sbin/halt
>-rwxr-xr-x 1 root root 8224 2003-03-14 00:16 /sbin/halt
>
>I am guessing here that as the halt script is owned by root and in the group
>root you need to set up the sudo command. Make an entry into the sudoers
>list for the command halt to be run by any user. This may be a security
>issue, however. Have a look at this link for further help with sudo,you
>must use visudo for editing the sudoers list.
>
>http://unix.about.com/library/weekly/aa102500a.htm

Thank you for this!

I never understood the structure behind this.
'halt' is a root/su owned command but as a user (in KDE) I click a
simple button to power down the machine. Strange ...

Is there another way to automatically switch off the machine at a
certain time? I have to use IDE Harddisks and I have read that these
are not for permanent use as opposed to SCSI drives ...

Reinhard



Relevant Pages

  • Re: turn off FreeBSD 5.1 machine? completely?
    ... From multiuser state become superuser ... power button without fear of damaging the filesystems. ... your system is waiting for the root password before it goes ... command as above to bring the system down cleanly. ...
    (freebsd-questions)
  • Re: "rewriting" bash pipeline
    ... >> Suppose I'm executing a lengthy command, `make universe', and some ... But what if a moment later I decide NOT to power off? ... you mean poweroff does an immediate power off without ... to halt, and halt tells init to switch to runlevel 0 or 6 *first* if it's ...
    (comp.os.linux.misc)
  • Re: How do I set up an alias of rm="rm -i" as the root user?
    ... You won't save your system by tweaking the 'rm' command, ... better spend some resources on restricting who may be root ... and educate the ones that will have rootly powers. ... full power during individual commands that really needs power. ...
    (comp.unix.admin)
  • Re: SuSE-9.1: How to poweroff a dual processor (Tyan Tiger 2460) system?
    ... > based SuSE-9.1 system to power off? ... halt -p as root from the cli? ...
    (alt.os.linux.suse)
  • Re: super user issue
    ... which is the best option in *my* laptop to access root's power and ... include myself in a group and allow the group to run all command as ... ## Allow root to run any commands anywhere ...
    (comp.os.linux.setup)