[CentOS] crontab and gedit

Wed Jan 23 21:11:49 UTC 2013
m.roth at 5-cent.us <m.roth at 5-cent.us>

Cliff Pratt wrote:
> On Thu, Jan 24, 2013 at 7:52 AM, Robert Moskowitz <rgm at htt-consult.com>
> wrote:
>> On 01/23/2013 01:39 PM, m.roth at 5-cent.us wrote:
>>> Robert Moskowitz wrote:
>>>> On 01/23/2013 06:23 AM, Adekoya Adekunle wrote:
>>>>> How can I open crontab with gedit any any other editor ?
>>>>>
>>>>> i want to edit my cron jobs with other editors beside vi.
>>>>   From a terminal window:
>>>>
>>>> su
>>>> gedit /etc/crontab &
>>>>
>>>> I do it all the time.  I suppose there is a one line variant with
>>>> sudo, but I tend to have a root terminal open for lots of different
things.
>>> Bad idea. Very much depreciated. You should edit crontab using -e [1],
>>> and sudoers with visudo.
>>>
>>> 1] to use a different editor, from the man pages:
>>> ENVIRONMENT
>>>
>>>         VISUAL          Invoked by visudo as the editor to use
>>>
>>>         EDITOR          Used by visudo if VISUAL is not set
>>>
>>> Using the correct tool invokes syntax checking *before* it's saved. If
>>> you don't have root password, you could seriously be up the creek if you
>>> make a typo in sudoers....
>>
>> Serious typos abound.  The most serious one I did was to fstab once upon
>> a time.
>>
>> I don't use sudo.  If I need root changes, I better have the root
>> password to use su.  If I don't have the root password, then it is
>> either not my system to change, or I have a serious problem indeed.

Some environments prefer you use sudo, even if it's sudo -s, so that what
you do is logged.
>>
> That's fine unless you have 100s of machines to administer. If you
> have 100 machines do you a) set all the root passwords to the same, or
> b) maintain a manual file of logins.

Or even a few... if the one you screw up on is a production server, or one
that the developers are going nuts on, or is about to be used for a
presentation to upper management, and you can't take it down to single
user....

        mark