- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- crontab removal
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
тАО07-25-2000 09:38 AM
тАО07-25-2000 09:38 AM
K460, HP-UX 10.20 . I have one user who left and so I used " userdel -r login" to remove his account from that machine. After some time I started getting lots of emails about his cronjobs. I checked and found that his crontab entry in /var/spool/cron/crontabs was still there and it was getting executed, since his home directory was removed , i was getting the falied cronjobs email.
My question is userdel should have removed the users all data including his cronjobs. If not , whats the best way to do it ( rather than deleting it from /var/spool/cron/crontabs)
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 09:51 AM
тАО07-25-2000 09:51 AM
Re: crontab removal
Brian
<*(((>< er
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-25-2000 09:54 AM
тАО07-25-2000 09:54 AM
SolutionYou could edit the crontab using crontab -e and then remove the entries in question.
If this crontab is as the user, the crontabs are in /var/spool/cron/crontabs/
You could manually remove the crontab file for the user but I would save a backup copy. Then stop/restart the crontab process, this will force a reread if you do the manual removal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2000 08:12 AM
тАО07-27-2000 08:12 AM
Re: crontab removal
This could include deleting crontab jobs, atjobs, mail file, pending printer jobs, ...
It may be advantageous to perform a special backup of the home directories / other infrastructure prior to running userdel. The user may run key infrastructure tasks under their login such as reporting, release control, ...
To delete the jobs, as your are running userdel as root you may just as well delete the physical file
/var/spool/cron/crontabs/${user}
I would also keep a logfile of who was deleted when, by whom and from which login client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2000 08:35 AM
тАО07-27-2000 08:35 AM
Re: crontab removal
I think if the mails had not hit me , I would have not noted it. And its right to add a wrapper around userdel.
My colleague ( sun admin) told me that sun has a nice feature that , even if the crontabs of the user are not removed , the system checks if the user exists before executing his cronjobs and so if the user is non-existent his cronjobs will not get executed. I hope HP implements something in future patches. Not a big deal.
Thanks again,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2000 08:49 AM
тАО07-27-2000 08:49 AM
Re: crontab removal
I also perform a find on the system looking for files that the user owns and keep a list of their attributes for auditing purposes. From this list I also review its contents and move any files that may have an impact to areas that I can have access to later. For instance, move the user crontab to a backup area. The jobs will no longer process, but you have a reference to what used to process in the event that something there is critical.