System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to enable the crontab for user in hpux

 
SOLVED
Go to solution
senthil_kumar_2
Regular Advisor

how to enable the crontab for user in hpux

Hi All,

I have one user called "john" I would like enable the cron for that user, So i have done following steps in HP-UX 11.31.

1)Added the user name "john" in cron.allow by root

#vi /var/adm/cron/cron.allow
root
adm
uucp
john ---> newly added.

2)Then I have logged in as john.

3)I ran below command and got following error.

# crontab -e
emacs: No such file or directory
crontab: can't create your crontab file in the crontab directory.


How to solve this?
15 REPLIES 15
Tim Nelson
Honored Contributor

Re: how to enable the crontab for user in hpux

check perms on /var/spool/cron/crontabs

Steven E. Protter
Exalted Contributor

Re: how to enable the crontab for user in hpux

Shalom,

Permissions on /var/adm/cron/cron.allow

-r--r--r-- 1 bin bin 137 Mar 10 2009 cron.allow

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
senthil_kumar_2
Regular Advisor

Re: how to enable the crontab for user in hpux

Hi Tim Nelson,

Please find the details.

# cd /var/spool/cron/
# ll
drwxrwxrwx 2 bin bin 96 Apr 13 08:34 crontabs
senthil_kumar_2
Regular Advisor

Re: how to enable the crontab for user in hpux

Hi Steven,

# ll /var/adm/cron/cron.allow
-rw-r--r-- 1 bin bin 23 Apr 13 06:40 /var/adm/cron/cron.allow
R.O.
Esteemed Contributor

Re: how to enable the crontab for user in hpux

Hi,

Try to change your $EDITOR variable from "emacs" to "vi" and try again.

Regards,
"When you look into an abyss, the abyss also looks into you"
Pete Randall
Outstanding Contributor

Re: how to enable the crontab for user in hpux

I too would suspect the editor. Emacs has a habit of trying to create a backup file suffixed with a ~, and you don't have permissions.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: how to enable the crontab for user in hpux

Oops! I just now saw the directory permissions so that would tend to blow that theory. I'd still be interested to see the results of changing your editor variable.

export EDITOR=vi

then retry "crontab -e"


Pete

Pete
senthil_kumar_2
Regular Advisor

Re: how to enable the crontab for user in hpux

Not able to change the editor.

I tried following methods.

1)# vi /home/john/.profile

export EDITOR = vi


1.1)then I loged in as john

1.2)# crontab -e
emacs: No such file or directory
crontab: can't create your crontab file in the crontab directory.

1.3)# echo $EDITOR
emacs


Then I have tried following steps.

2)# vi /etc/profile

export EDITOR = vi

2.1)then I loged in as john

2.2)# crontab -e
emacs: No such file or directory
crontab: can't create your crontab file in the crontab directory.

2.3)# echo $EDITOR
emacs


How to solve the issue



Highlighted
R.O.
Esteemed Contributor
Solution

Re: how to enable the crontab for user in hpux

export EDITOR=vi (without spaces within)

Regards,
"When you look into an abyss, the abyss also looks into you"