Operating System - HP-UX
1836612 Members
3850 Online
110102 Solutions
New Discussion

"crontab -e" doesn't display crontab of root user

 
SOLVED
Go to solution
Dmitriy Peshiy
Advisor

"crontab -e" doesn't display crontab of root user

Hi all!

Could anyone help me with crontab. I've tried to edit crontab of root user with command "crontab -e", but haven't seen anything. Crontab file exist on /var/spool/cron/crontabs/root and I can edit it by vi.

I have HP-UX 11.11.

What's problem?

Thanks in advance.
Dmitriy.
22 REPLIES 22
Robert-Jan Goossens_1
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

Hu Dmitriy,

Any error messages ?

Could you check if root is disabled/enabled in the /usr/lib/cron/cron.allow (cron.deny)

Robert-Jan
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Hi, Rbert!

In cron.allow file exist root user. Cron.deny doesn't exist on system.

Thanks. Dmitriy.
Robert-Jan Goossens_1
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

should be ok.

could you post
# tail /var/adm/cron/log
is cron still working ?

Regards,
Robert-Jan
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Robert,

i've restarted just morning today cron daemon. But it doesn't help. and it still working (see attachment).

Dmitriy.
Robert-Jan Goossens_1
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

Any full filesytems ?

Is dmesg reporting problems ?

Robert-Jan
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Robert,

in attachment dmesg output and bdf output.

Dmitriy.
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Sorry Robert,

The last message has incorrect attachment.

In attachment dmesg output and bdf output.

Dmitriy.
Robert-Jan Goossens_1
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

dmesg reported /tmp full, but if I look at your bfd output their should be enough space.

Could you check the permissions of

drwxr-xr-x 31 root root 5120 Dec 6 03:32 /
drwxr-xr-x 20 bin bin 1024 Apr 18 1999 /var
dr-xr-xr-x 14 bin bin 1024 Jul 21 1999 /var/spool
dr-xr-xr-x 7 bin bin 1024 Jan 4 2001 /var/spool/cron
dr-xr-xr-x 2 bin bin 1024 Jan 28 13:34 /var/spool/cron/crontabs
-r-------- 1 root sys 1044 Mar 17 10:19 /var/spool/cron/crontabs/root

Robert-Jan
RolandH
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

Does

/usr/spool/cron/crontabs/root exist?

This is the real file that root is reading.

Roland
Sometimes you lose and sometimes the others win
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Robert,

permissions:
dr-xr-xr-x 25 bin bin 8192 Mar 17 2004 var
dr-xr-xr-x 13 bin bin 8192 Mar 25 2003 /var/spool
dr-xr-xr-x 5 bin bin 96 Nov 15 2000 /var/spool/cron
dr-xr-xr-x 2 bin bin 96 Sep 8 2004 /var/adm/spool/cron/crontabs
-r-------- 1 root sys 1798 Mar 17 11:22 /var/spool/cron/crontabs/root

Roland,

the file /usr/spool/cron/crontabs/root exist with next atributes:
-r-------- 1 root sys 1798 Mar 17 11:22 /usr/spool/cron/crontabs/root

Thans to all.

Dmitriy.
Joseph Loo
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

hi,

just curious, r u able to login as root and run:

# crontab -l

regards.
what you do not see does not mean you should not believe
Walter Pisani
New Member

Re: "crontab -e" doesn't display crontab of root user

Hi,

The command "crontab -e" it create temporary file in /tmp. Verify the permission and the space in /tmp.

Bye
Kent Ostby
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

Hi -- When you say you don't see anything, do you just get a blank vi file or do you return to the prompt or do you get some sort of error message ?
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Joseph,

the same situation as i'm type #crontab -l in command line.

Walter,

Permission and space on /tmp is ok.

I guess I should reinstall cron deamon. Does anyone know about new verisons of cron daemon etc...?

Thanks to all.
Dmitriy.
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Hi, Kent!

When I've typed "crontab -e" in command line I've returned to the prompt.

Thanks for question,
Dmitriy.
Kent Ostby
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

Are you logged in as root at the time or a root equivilant user ?
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Kent,
I've logged as a root with him env.

Dmitriy.
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: "crontab -e" doesn't display crontab of root user

could you check if below patch is installed ?

# swlist -l product | grep PHCO_26562
Kent Ostby
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

What is the EDITOR set to (i.e echo $EDITOR ).

If this does not return "vi" then that is likely your problem.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Joseph Loo
Honored Contributor

Re: "crontab -e" doesn't display crontab of root user

hi,

could u reply on this?

# what /usr/bin/crontab

cause if PHCO_26562 is not applied, your problem may be because of this.

regards.
what you do not see does not mean you should not believe
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Thanks to all.

After installing PHCO_26562 patch the problem was solved.

Thanks again and have a nice day.

Dmitriy.
Dmitriy Peshiy
Advisor

Re: "crontab -e" doesn't display crontab of root user

Thanks again.

I've closed the question.

Best regards. Dmitriy.