- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Running cron jobs for a different userid
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
Forums
Discussions
Discussions
Discussions
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
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
05-24-2001 07:22 AM
05-24-2001 07:22 AM
to extract a message to a file for a particular user.
I would like to run this from a cron job WITHOUT having to give the user cron.allow access.
The mail utility defaults to the user who
owns the cron process and I need it to check
the mail from a different user.
Does anyone know of a way to run a cron job
via the root cron, but somehow redirect/
re-address the userid that job runs against
so that it will check THAT user's mailbox
insteadof the root mailbox??
Thanks in advance
Ted Blahunka
tblahunka@enh.org
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2001 07:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2001 07:51 AM
05-24-2001 07:51 AM
Re: Running cron jobs for a different userid
That worked great.
Thanks for the tip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2001 08:30 AM
05-24-2001 08:30 AM
Re: Running cron jobs for a different userid
(not sure for the full 100% but very close)
Better would be the redirect all output in your script and mail it if required.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2001 08:36 AM
05-24-2001 08:36 AM
Re: Running cron jobs for a different userid
I tried Pat's suggestion and it does work
the way I wanted it to. To test , I put a
sleep statement in the script so I could
monitor the cron invoked process, and it
does show up running under
only glitch was that the output file was
still owned by root, but a chown in the
script after the redirect finishes fixed
that as well.
Thanks for your input
Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2001 08:48 AM
05-24-2001 08:48 AM
Re: Running cron jobs for a different userid
I fully agree Patrick's idea is THE way to have a cron job being executed without explicitely giving crontab permission to a user.
But as I presumed (and have just verified :) if the cronjob has any standard output or error then this will be mailed to root, and not to the su'ed user! You will explicitely have to redirect all output in the cronjobs yourself.
regards,
Thierry.