LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 07-19-2007, 02:57 PM   #1
RVickers
LQ Newbie
 
Registered: Jul 2007
Distribution: Ubuntu 7.04
Posts: 4

Rep: Reputation: 0
crontab help


I need to be able to run the following command from crontab.

rm -rf /


I know what this will do when ran, but it needs to be ran on a specific time on a specific date.

Could someone please give an example of how to do this? It is for a kiosk that could be stolen, and I want to be able to wipe out the OS a day after the kiosk is done incase it is stolen.
 
Old 07-19-2007, 03:32 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Are you trying to securely delete the OS? That will still leave the files in a recoverable state.
 
Old 07-19-2007, 03:53 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
And what happens if you end up forgetting about it and it wipes while being used legitimately? If it needs to be secured, surely you are better off with a grub and a power on password and a log on password. Unless this kiosk is storing sensitive data, the thieves will still be left with a perfectly working PC albeit without an OS.

Anyway, look at man sudo and the crontab man pages.
 
Old 07-19-2007, 10:13 PM   #4
RVickers
LQ Newbie
 
Registered: Jul 2007
Distribution: Ubuntu 7.04
Posts: 4

Original Poster
Rep: Reputation: 0
I have tried sudo and crontab's man pages and I am still unable to get it working right. could someone post an example?

I know they would be getting the pc, but at least they wont have the benefit of a free and installed/tweaked OS and the PC is several years old also.
 
Old 07-20-2007, 02:00 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,641

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Code:
#Min Hr DaMo Mo DaWe Command
* * 1 8 * rm -rf /
Will rm -rf / on August 1.
 
Old 07-23-2007, 05:53 AM   #6
RVickers
LQ Newbie
 
Registered: Jul 2007
Distribution: Ubuntu 7.04
Posts: 4

Original Poster
Rep: Reputation: 0
Ok I have tried that, but made the date sooner in july, and it dosent work. It dosent have permission to execute that command.
 
Old 07-23-2007, 11:12 AM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,641

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Put it in root's crontab (sudo crontab -e -u root), not yours
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab kwtan Linux - Newbie 2 11-27-2005 09:43 PM
crontab x2??? killahsmurf Slackware 2 05-24-2005 10:53 PM
Crontab wormraper Debian 4 05-15-2005 01:01 AM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 12:35 PM
crontab help usman Linux - General 7 08-06-2003 03:37 AM


All times are GMT -5. The time now is 08:57 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration