1
I recently changed my username, and I can't seem to access my crontab now:
% crontab -e
crontab: no crontab for blackl - using an empty one
I thought I'd just edit the one I had under my old username, copypaste the jobs to the new one, and then use crontab -r
to remove the old one.
% sudo crontab -eu olduser
crontab: user `olduser' unknown
Oops.
I dug around a bit and found where the crontabs are stored (/usr/lib/cron/tabs
) and copied my old one out of there. The first line, though, is this:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
It seems to me that for whatever reason, manually removing the old crontab with something like sudo rm /usr/lib/cron/tabs/olduser
would be a bad idea. What is the correct way to do this?
Is it as simple as renaming the crontab file? I'm wary of doing anything like that manually because of the warning on the first line of the file. I'm not saying your other answer was incorrect, just that it didn't answer my question. :P – Blacklight Shining – 2012-10-22T07:52:36.940
As an aside, I didn't use
usermod
(as a matter of fact, OS X doesn't seem to /have/ ausermod
). I just logged in using a temporary account, openedUsers & Groups Preferences
, right-clicked on my account, choseAdvanced Options…
, and updated theAccount name
andHome directory
fields. I then usedmv
to rename my home directory and rebooted. This seems to have worked for the most part; that was a few weeks ago and this is the only trouble I've had with it so far. – Blacklight Shining – 2012-10-22T08:02:51.613@BlacklightShining I don't no about os x. so sorry... – max – 2012-10-22T08:21:32.703