<?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: cannot edit crontab within script sessions in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995421#M779359</link>
    <description>I'm still confused, but I guess I have a suitable workaround.  Thanks.</description>
    <pubDate>Fri, 04 Aug 2006 13:44:24 GMT</pubDate>
    <dc:creator>Ben Dehner</dc:creator>
    <dc:date>2006-08-04T13:44:24Z</dc:date>
    <item>
      <title>cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995414#M779352</link>
      <description>&lt;!--!*#--&gt;This one's got me baffled.  I've got crontab set up for some normal users.  If you invoke 'crontab -e', you can modify and save the crontab file as normal.   However, if you are within a 'script' session, that is&lt;BR /&gt;&lt;BR /&gt;script somefile&lt;BR /&gt;crontab -e&lt;BR /&gt;&lt;BR /&gt;crontab still invokes the editor (vi) as normal, but when you try to exit, it gives an error message&lt;BR /&gt;&lt;BR /&gt;crontab: can't create your crontab file in the cdrontab directory.&lt;BR /&gt;&lt;BR /&gt;Funny thing, I have no problems on our 11.23 system, but I see this problem on our 11.11 systems.  And yes, I know capturing the output of a vi editor in a script is of dubious value, but that's another matter.</description>
      <pubDate>Fri, 04 Aug 2006 10:14:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995414#M779352</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2006-08-04T10:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995415#M779353</link>
      <description>Ben,&lt;BR /&gt;when you run crontab -e it uses a temporary file to edit in vi. On exit it writes the data back to the original file.&lt;BR /&gt;&lt;BR /&gt;Have you compared privs on /usr/bin/crontab ?&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Aug 2006 10:36:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995415#M779353</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-04T10:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995416#M779354</link>
      <description>Priviledges on /usr/bin/crontab was one of the first things I checked; looks fine.  (Perm 4555, owner/group = root/bin).  I also checked the permission on the /var/spool/cron/crontabs directory, and those all look good.</description>
      <pubDate>Fri, 04 Aug 2006 10:54:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995416#M779354</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2006-08-04T10:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995417#M779355</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I definitly would not call "crontab -e" in a script.&lt;BR /&gt;Let another file be processed by your script, initialized via&lt;BR /&gt;crontab -l &amp;gt;tmpfile&lt;BR /&gt;&lt;BR /&gt;After all modifications are done, perform something like&lt;BR /&gt;&lt;BR /&gt;if crontab tmpfile&lt;BR /&gt;then rm tmpfile&lt;BR /&gt;else&lt;BR /&gt; # do error processing, tmpfile kept&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Fri, 04 Aug 2006 11:02:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995417#M779355</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-08-04T11:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995418#M779356</link>
      <description>/usr/bin/script doesn't have setuid, does it?&lt;BR /&gt;&lt;BR /&gt;If you start script can you do a 'crontab -l &amp;gt; my.cron', then 'crontab my.cron', or do you get the error then, too?&lt;BR /&gt;&lt;BR /&gt;If not, you could script a &lt;BR /&gt;crontab -l &amp;gt; my.cron &amp;amp;&amp;amp; vi my.cron &amp;amp;&amp;amp; crontab my.cron&lt;BR /&gt;command.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Aug 2006 11:05:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995418#M779356</guid>
      <dc:creator>Jonathan Fife</dc:creator>
      <dc:date>2006-08-04T11:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995419#M779357</link>
      <description>&lt;!--!*#--&gt;Weird.&lt;BR /&gt;&lt;BR /&gt;If I do&lt;BR /&gt;&lt;BR /&gt;crontab -l &amp;gt; tmpfile&lt;BR /&gt;... edit tmpfile&lt;BR /&gt;crontab tmpfile&lt;BR /&gt;&lt;BR /&gt;it works and I don't get the error.</description>
      <pubDate>Fri, 04 Aug 2006 12:51:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995419#M779357</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2006-08-04T12:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995420#M779358</link>
      <description>In any event, the 3 step process is, by far, the better approach. crontab -e is an accident waiting to happen and I never use it.</description>
      <pubDate>Fri, 04 Aug 2006 12:54:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995420#M779358</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-04T12:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995421#M779359</link>
      <description>I'm still confused, but I guess I have a suitable workaround.  Thanks.</description>
      <pubDate>Fri, 04 Aug 2006 13:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995421#M779359</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2006-08-04T13:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: cannot edit crontab within script sessions</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995422#M779360</link>
      <description>Using crontab -l &amp;gt; file will work for me.</description>
      <pubDate>Fri, 04 Aug 2006 13:45:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cannot-edit-crontab-within-script-sessions/m-p/4995422#M779360</guid>
      <dc:creator>Ben Dehner</dc:creator>
      <dc:date>2006-08-04T13:45:17Z</dc:date>
    </item>
  </channel>
</rss>

