<?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: Maintain su'd user during script? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478669#M704372</link>
    <description>Patrick:&lt;BR /&gt;&lt;BR /&gt;Thanks, I had seen that kind of reference before ... this helped a lot.  However, I do have a follow-up question:&lt;BR /&gt;&lt;BR /&gt;The script I am calling contains the following:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;# Look at what kind of file is being transferred and execute the appropriate compile command&lt;BR /&gt;&lt;BR /&gt;case "$vcsfile_suffix" in&lt;BR /&gt;".qks") qd $vcsfile;;&lt;BR /&gt;".cob") sc_cobcomp $vcsfile;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Aside from the fact that I don't see a new object file being created (I'm transferring a .qks file and the qd command is supposed to do a compile and write an object) how can I get a copy of what is happening within the script to see WHY my new object isn't being created.&lt;BR /&gt;&lt;BR /&gt;The qd command works from the command line if you enter the file name after it and I know the system I calling the script from is passing the $vcsfile variable.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
    <pubDate>Fri, 04 Feb 2005 09:39:01 GMT</pubDate>
    <dc:creator>Jeff Crump</dc:creator>
    <dc:date>2005-02-04T09:39:01Z</dc:date>
    <item>
      <title>Maintain su'd user during script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478666#M704369</link>
      <description>I am attempting to su to a user (su - prandall) within a script but when I look at the output (&amp;gt; /home/prandall/log.txt) the next command (whoami) after the su does not appear to be executed by prandall.  The system shows a logout.&lt;BR /&gt;&lt;BR /&gt;How do I maintain the su'd user during the entire script?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 04 Feb 2005 09:08:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478666#M704369</guid>
      <dc:creator>Jeff Crump</dc:creator>
      <dc:date>2005-02-04T09:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Maintain su'd user during script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478667#M704370</link>
      <description>You don't.&lt;BR /&gt;&lt;BR /&gt;The better thing to do would be to write a separate script with the commands you want to run as the prandall user.  Then execute that script like this:&lt;BR /&gt;&lt;BR /&gt;su - prandall -c scriptname</description>
      <pubDate>Fri, 04 Feb 2005 09:11:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478667#M704370</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-02-04T09:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Maintain su'd user during script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478668#M704371</link>
      <description>The answer is obvious:  because I didn't execute it!!&lt;BR /&gt;&lt;BR /&gt;;^)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;prandall</description>
      <pubDate>Fri, 04 Feb 2005 09:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478668#M704371</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2005-02-04T09:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Maintain su'd user during script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478669#M704372</link>
      <description>Patrick:&lt;BR /&gt;&lt;BR /&gt;Thanks, I had seen that kind of reference before ... this helped a lot.  However, I do have a follow-up question:&lt;BR /&gt;&lt;BR /&gt;The script I am calling contains the following:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;# Look at what kind of file is being transferred and execute the appropriate compile command&lt;BR /&gt;&lt;BR /&gt;case "$vcsfile_suffix" in&lt;BR /&gt;".qks") qd $vcsfile;;&lt;BR /&gt;".cob") sc_cobcomp $vcsfile;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Aside from the fact that I don't see a new object file being created (I'm transferring a .qks file and the qd command is supposed to do a compile and write an object) how can I get a copy of what is happening within the script to see WHY my new object isn't being created.&lt;BR /&gt;&lt;BR /&gt;The qd command works from the command line if you enter the file name after it and I know the system I calling the script from is passing the $vcsfile variable.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 04 Feb 2005 09:39:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478669#M704372</guid>
      <dc:creator>Jeff Crump</dc:creator>
      <dc:date>2005-02-04T09:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Maintain su'd user during script?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478670#M704373</link>
      <description>Try something like this:&lt;BR /&gt;&lt;BR /&gt;su - prandall -c command &amp;gt; logfile 2&amp;gt;&amp;amp;1</description>
      <pubDate>Fri, 04 Feb 2005 10:00:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/maintain-su-d-user-during-script/m-p/3478670#M704373</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-02-04T10:00:18Z</dc:date>
    </item>
  </channel>
</rss>

