LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unable to open the crontab file on ubuntu server ? (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-open-the-crontab-file-on-ubuntu-server-4175461856/)

srinira2 05-13-2013 11:53 PM

unable to open the crontab file on ubuntu server ?
 
1.i have configured sudo privileges for normal user i am unable to open the crontab file getting error like this below.

srinivas@ubuntu:~$ sudo crontab -e
[sudo] password for srinivas:
1107

i am using using ubuntu operating system please find the below version.

srinivas@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid

jdkaye 05-14-2013 01:19 AM

Quote:

Originally Posted by srinira2 (Post 4950584)
1.i have configured sudo privileges for normal user i am unable to open the crontab file getting error like this below.

srinivas@ubuntu:~$ sudo crontab -e
[sudo] password for srinivas:
1107

Sorry, I don't see any error message. Did you forget to post it?
Quote:

i am using using ubuntu operating system please find the below version.

srinivas@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.3 LTS
Release: 10.04
Codename: lucid
Your version of Ubuntu is 10.04 which is rather old. Wouldn't it be easier to update your system to a more recent version?
jdk

srinira2 05-14-2013 04:21 AM

Hi jdkaye,

i am facing the below issue i am unable to edit the crontab file using below this command.

srinivas@ubuntu:~$ sudo crontab -e
[sudo] password for srinivas:
1107

?

?

?

?

?

?
^Z
[1]+ Stopped sudo crontab -e
srinivas@ubuntu:~$

chrism01 05-14-2013 04:42 AM

You need to just 'sudo su -' up to root.
It looks like you haven't got a default EDITOR env var setup, so its probably defaulting to 'ed' or 'ex'; really old school editors.
See eg http://www.f15ijp.com/2010/01/changi...r-for-crontab/

jdkaye 05-14-2013 04:50 AM

I think it's waiting for you to input something into the file. Try typing this
Code:

:q
and that will exit you from the editor.
jdk

frankbell 05-14-2013 08:53 PM

If you wish to edit the crontab, the canonical command (and I mean that as in "canon," not as in "Shuttleworth") is

Code:

visudo
.

On Ubuntu, to edit the root crontab, you would enter

Code:

sudo visudo
.

chrism01 05-15-2013 12:09 AM

I think you'll find 'visudo' is for the sudoers file, unless Ubuntu have done another weird thing ;)

frankbell 05-15-2013 07:36 PM

You are right, chrism01. Thanks for correcting my brain skip!

srinira2 05-17-2013 03:24 AM

Thanks for all of you my issue is resolved.

jdkaye 05-17-2013 04:06 AM

Please use the Thread Tools menu located just above your first post on this thread to mark it as [Solved]. You might want to summarise how you solved your problem.
Thanks,
jdk


All times are GMT -5. The time now is 06:50 AM.