crontab -r deletes cron entries without asking for confirmation

Bug #1451286 reported by Anonymous on 2015-05-04
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cron (Debian)
New
Unknown
cron (Ubuntu)
High
Unassigned

Bug Description

type: crontab -r

Expected use case : should ask user if they really want to delete this file, of which there are no backups on the system by default, and may take hours to restore by hand, if it's even possible.

what happens: user's cron entry is deleted with no warning.

Hallo Anonymous,

there are a crontab for the system and a crontab for each user. You can make your entries to /etc/crontab and have to be root to edit and remove.
To save your "user" crontab I think you have to back it up.

Greets

Changed in cron (Ubuntu):
status: New → Invalid
Anonymous (reason) wrote :

Telling the user to manually back up a file because the program might delete it with no warning is NOT a good solution.

Totally ignored, and marked invalid. Typical.

Christian Kastner (ckk) wrote :

This is a valid request. I've linked this bug to the corresponding bug in Debian's cron.

Changed in cron (Ubuntu):
status: Invalid → Confirmed
Changed in cron (Debian):
status: Unknown → New
Akiva (bloch-akiva) wrote :

I just wanted to mention that on many keyboards the letters e and r are adjacent and that "crontab -e" is a very common command.
this increases the risk that someone might mistakenly delete his user crontab while trying to edit it

Akiva (bloch-akiva) wrote :

set the default behaviour of deleting a crontab to be prompt (and enable suppressing this with -I)

The attachment "crontab_patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in cron (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.