<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: at -l in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948559#M413157</link>
    <description>What I was missing is the fact that the scheduling time is embedded into the file name of the at job. Perhaps I should have guessed, but the only hint is (again) what the man page says about duplicate time schedules result in the job scheduled in the next available second...&lt;BR /&gt;&lt;BR /&gt;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&lt;BR /&gt;uid=222(mcovas) gid=100(sag) euid=0(root)&lt;BR /&gt;(i.e. I am privileged)&lt;BR /&gt;and&lt;BR /&gt;I still get&lt;BR /&gt;"you don't own 1135377000.p"&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# atjobs.sh&lt;BR /&gt;#&lt;BR /&gt;ATJOBSDIR=/var/spool/cron/atjobs&lt;BR /&gt;&lt;BR /&gt;id&lt;BR /&gt;&lt;BR /&gt;at -l $(ls $ATJOBSDIR)&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;</description>
    <pubDate>Fri, 23 Dec 2005 08:22:30 GMT</pubDate>
    <dc:creator>Miguel Covas</dc:creator>
    <dc:date>2005-12-23T08:22:30Z</dc:date>
    <item>
      <title>at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948554#M413152</link>
      <description>I need to monitor which jobs are submitted by a&lt;BR /&gt;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&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The at man states that:&lt;BR /&gt;"All users can list and remove their own jobs.  Users with appropriate&lt;BR /&gt;privileges can list and remove jobs other than their own."&lt;BR /&gt;&lt;BR /&gt;Appropiate privileges? Which privileges?&lt;BR /&gt;&lt;BR /&gt;I could otherwise use a perl script and&lt;BR /&gt;examine /var/spool/cron/atjobs/*, which I'm&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;The commands go at the end of the file, but&lt;BR /&gt;what about the release time that is listed&lt;BR /&gt;using "at -l".&lt;BR /&gt;&lt;BR /&gt;I'm wondering if I could fiddle a bit&lt;BR /&gt;with the .proto file and (using $t) produce&lt;BR /&gt;some line containing seconds since January 1, 1970 .... ooff&lt;BR /&gt;&lt;BR /&gt;There must be a way to allow some user to&lt;BR /&gt;look at the jobs from some user group, or&lt;BR /&gt;even to all the jobs...&lt;BR /&gt;&lt;BR /&gt;Ideas? Shall I go on with $t mingling?&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Dec 2005 15:20:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948554#M413152</guid>
      <dc:creator>Miguel Covas</dc:creator>
      <dc:date>2005-12-22T15:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948555#M413153</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;You can use sudo to allow a normal user id to run the at command as root.&lt;BR /&gt;&lt;BR /&gt;If you need to download sudo, try this link,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you need more information on sudo, just search this forum with the keyword sudo.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;regds&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Dec 2005 15:33:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948555#M413153</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2005-12-22T15:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948556#M413154</link>
      <description>Hi Miquel:&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you are missing.  The jobs in '/var/adm/cron/atjobs' are world-readable and have a name like:&lt;BR /&gt;&lt;BR /&gt;/var/adm/cron/atjobs/1135284360.a&lt;BR /&gt;&lt;BR /&gt;...where the digits of the basename are the epoch seconds.&lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 22 Dec 2005 15:40:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948556#M413154</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-22T15:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948557#M413155</link>
      <description>I developped a crsipt called atl which shows you the command submitted.&lt;BR /&gt;Feel free to use it.&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 23 Dec 2005 05:24:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948557#M413155</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2005-12-23T05:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948558#M413156</link>
      <description>I developped a script called atl which shows you the command submitted.&lt;BR /&gt;Feel free to use it.&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Fri, 23 Dec 2005 05:24:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948558#M413156</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2005-12-23T05:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948559#M413157</link>
      <description>What I was missing is the fact that the scheduling time is embedded into the file name of the at job. Perhaps I should have guessed, but the only hint is (again) what the man page says about duplicate time schedules result in the job scheduled in the next available second...&lt;BR /&gt;&lt;BR /&gt;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&lt;BR /&gt;uid=222(mcovas) gid=100(sag) euid=0(root)&lt;BR /&gt;(i.e. I am privileged)&lt;BR /&gt;and&lt;BR /&gt;I still get&lt;BR /&gt;"you don't own 1135377000.p"&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# atjobs.sh&lt;BR /&gt;#&lt;BR /&gt;ATJOBSDIR=/var/spool/cron/atjobs&lt;BR /&gt;&lt;BR /&gt;id&lt;BR /&gt;&lt;BR /&gt;at -l $(ls $ATJOBSDIR)&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Dec 2005 08:22:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948559#M413157</guid>
      <dc:creator>Miguel Covas</dc:creator>
      <dc:date>2005-12-23T08:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: at -l</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948560#M413158</link>
      <description>I'll proceed with the perl script</description>
      <pubDate>Fri, 23 Dec 2005 08:29:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/at-l/m-p/4948560#M413158</guid>
      <dc:creator>Miguel Covas</dc:creator>
      <dc:date>2005-12-23T08:29:04Z</dc:date>
    </item>
  </channel>
</rss>

