- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cron job memory
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2006 08:44 PM
тАО08-20-2006 08:44 PM
I removed a user from a large number of HP-UX 11.00 and 11.11 servers (userdel -r) and I also removed that user's crontab file from under /var/spool/cron/crontabs.
However from the /var/adm/cron/log file it appears as though this user is still executing its cronjob, eventhough it has been removed from the system.
Is there a better method to remove a users crontab from the system? Are cron jobs held somewhere in memory, or another file? Do I need to recycle the cron daemon?
I noticed the user still remains in /var/adm/cron/cron.alllow, obviously since he is no longer on the system I should remove it from that file. However I do not think this is the source of the issue, since the user is attempting to run a crontab at precisely the same time he would have run it were his crontab file still present - hence my thoughts that something is being held about this in another file or in memory.
Any help would be much appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2006 08:55 PM
тАО08-20-2006 08:55 PM
Re: cron job memory
With the user removed, here is how to rid the system of the cron jobs that have
been scheduled to run as the user:
1) If it exists, `vi /var/adm/cron/cron.allow` file and remove the user.
2) Remove the user's crontab:
#rm /var/spool/cron/crontabs/user_name
3) Stop and start cron:
# /sbin/init.d/cron stop
# /sbin/init.d/cron start
I guess you have to stop and start the cron, have you done this ?
Best Regards,
Prashanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2006 08:55 PM
тАО08-20-2006 08:55 PM
Re: cron job memory
With the user removed, here is how to rid the system of the cron jobs that have
been scheduled to run as the user:
1) If it exists, `vi /var/adm/cron/cron.allow` file and remove the user.
2) Remove the user's crontab:
#rm /var/spool/cron/crontabs/user_name
3) Stop and start cron:
# /sbin/init.d/cron stop
# /sbin/init.d/cron start
I guess you have to stop and start the cron, have you done this ? If not please try and let me know.
Best Regards,
Prashanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-20-2006 09:01 PM
тАО08-20-2006 09:01 PM
Re: cron job memory
/sbin/init.d/cron stop
/sbin/init.d/cron start
You must restart the daemon after denying or authorizing users to use cron.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2006 12:27 AM
тАО08-21-2006 12:27 AM
SolutionI think, after executing a
crontab -r
before calling the 'userdel' no restart of the cron daemon should be necessary.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2006 12:35 AM
тАО08-21-2006 12:35 AM
Re: cron job memory
Peter is correct. The proper way to manage crontasks is to use the 'crontab' command. Manually adding and/or removing files in '/var/spool/cron/crontabs' does not signal the 'cron' daemon of any changes. While adding or removing files and then stopping and restarting 'cron' would indeed accomplish the same objective, this is overkill and could potentially result in one or more user's missing a scheduled job start.
Regards!
...JRF...