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
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
тАО12-22-2005 07:20 AM
тАО12-22-2005 07:20 AM
group of users (And at what time are scheduled to run). However, at -l will list just the jobs I own. If you run at as root there is no problem, but since I plan to run the monitor from Apache I have a problem. Setting a script with setuid to
root (A solution I don't like) does not solves the problem: at seems to look at the uid or login name, not the effective uid.
The at man states that:
"All users can list and remove their own jobs. Users with appropriate
privileges can list and remove jobs other than their own."
Appropiate privileges? Which privileges?
I could otherwise use a perl script and
examine /var/spool/cron/atjobs/*, which I'm
going to do anyway for I want to know what command is associated to the job. From the owner of the files I can ascertain the user and from the name of the file find out the queue.
The commands go at the end of the file, but
what about the release time that is listed
using "at -l".
I'm wondering if I could fiddle a bit
with the .proto file and (using $t) produce
some line containing seconds since January 1, 1970 .... ooff
There must be a way to allow some user to
look at the jobs from some user group, or
even to all the jobs...
Ideas? Shall I go on with $t mingling?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2005 07:33 AM
тАО12-22-2005 07:33 AM
Re: at -l
Appropriate privileges is unix way of telling you that you need to be a user with more priviledges than a normal user which in most cases would be root.
You can use sudo to allow a normal user id to run the at command as root.
If you need to download sudo, try this link,
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/
If you need more information on sudo, just search this forum with the keyword sudo.
Hope this helps.
regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2005 07:40 AM
тАО12-22-2005 07:40 AM
SolutionI'm not sure what you are missing. The jobs in '/var/adm/cron/atjobs' are world-readable and have a name like:
/var/adm/cron/atjobs/1135284360.a
...where the digits of the basename are the epoch seconds.
Perl is an ideal choice for parsing the directory and its file's contents *and* (of course) turning a file's basename into the task's starttime. There should be no need to munge with the '.proto' $t.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2005 09:24 PM
тАО12-22-2005 09:24 PM
Re: at -l
Feel free to use it.
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2005 09:24 PM
тАО12-22-2005 09:24 PM
Re: at -l
Feel free to use it.
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 12:22 AM
тАО12-23-2005 12:22 AM
Re: at -l
Concerning sudo, I haven't it installed on the HP-UX servers, but on my workstation (Mac OS X) , therefore I can't test it. I am still not convinced that sudo does change the behaviour of "at". A shell script with setuid to root shows an id
uid=222(mcovas) gid=100(sag) euid=0(root)
(i.e. I am privileged)
and
I still get
"you don't own 1135377000.p"
#!/usr/bin/sh
# atjobs.sh
#
ATJOBSDIR=/var/spool/cron/atjobs
id
at -l $(ls $ATJOBSDIR)
exit 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2005 12:29 AM
тАО12-23-2005 12:29 AM