<?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: newgrp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934066#M112196</link>
    <description>It does function however.  Maybe it's not the right command to do what I need to do.  Basically, I need to switch the default gid of the process.</description>
    <pubDate>Mon, 24 Mar 2003 14:57:43 GMT</pubDate>
    <dc:creator>Gary L. Paveza, Jr.</dc:creator>
    <dc:date>2003-03-24T14:57:43Z</dc:date>
    <item>
      <title>newgrp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934064#M112194</link>
      <description>I have several users on my system which are members of several groups.  They need to be able to switch between their groups (as defined by /etc/groups) when in certain areas so that files are created using the correct group ID.  newgrp seems to do this, however, I'm trying to automate it.  They have a file which they must source each time they change application "levels".  In this file, all kinds of variables are set, and I'd like newgrp to be in there as well.  The problem is that anything in the script after the newgrp command is discarded.  While making it the last line of the file makes that problem go away, when this file is then sourced from within a script, the part of the script after the sourcing is discarded.  Anyone know of a way to do this?</description>
      <pubDate>Mon, 24 Mar 2003 14:50:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934064#M112194</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2003-03-24T14:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: newgrp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934065#M112195</link>
      <description>NAME&lt;BR /&gt;      newgrp - switch to a new group&lt;BR /&gt;&lt;BR /&gt;      The newgrp command changes your group ID without changing your user ID&lt;BR /&gt;      and replaces your current shell with a new one.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Its a command to be executed by the user, replacing the shell.  Sourcing it would not seem the right approach.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 24 Mar 2003 14:54:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934065#M112195</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-03-24T14:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: newgrp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934066#M112196</link>
      <description>It does function however.  Maybe it's not the right command to do what I need to do.  Basically, I need to switch the default gid of the process.</description>
      <pubDate>Mon, 24 Mar 2003 14:57:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934066#M112196</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2003-03-24T14:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: newgrp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934067#M112197</link>
      <description>Sounds like you've got several processes all with unique groups.  Identifying groups by process should be easy enough since processes will contain the UID and GID.&lt;BR /&gt;&lt;BR /&gt;ps -j (* pgid *)&lt;BR /&gt;&lt;BR /&gt;Something like:&lt;BR /&gt;&lt;BR /&gt;GPID=$(ps -j | grep -i process_name| awk '{ print $4 )'&lt;BR /&gt;&lt;BR /&gt;Then,&lt;BR /&gt;&lt;BR /&gt;newgrp $GPID</description>
      <pubDate>Mon, 24 Mar 2003 15:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/newgrp/m-p/2934067#M112197</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2003-03-24T15:23:20Z</dc:date>
    </item>
  </channel>
</rss>

