BTW....<div><br><div>   I already know about the following (and wrote the following code). I&#39;d rather log them into the group during the execution of the script, though, if I could:</div><div><br></div><div><div>    # Must be logged into bpg group</div>
<div>    if not os.getgid() == _BPG_GID:</div><div>        sys.stderr.write(</div><div>            &quot;\nERROR: You must be logged into bpg group! See: man newgrp\n\n&quot;)</div><div>        sys.exit(1)</div><div><br></div>
<div><br></div><div>Cheers,</div><div><br></div><div><br></div><div>Glen</div><br><div class="gmail_quote">On Thu, Oct 15, 2009 at 1:03 PM, Glen Jarvis <span dir="ltr">&lt;<a href="mailto:glen@glenjarvis.com">glen@glenjarvis.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I know.. I know.. RTFM :)  I usually do the digging myself. However, I&#39;m not finding what I think is probably there.<div>
<br></div><div>My users are in two Linux groups, A and B. The script that I&#39;m writing should log them into B (newgrp B from the linux prompt).</div>
<div><br></div><div>Since Python &#39;fits your brain,&#39; generally, I would expect something like os.newgroup(&#39;B&#39;), os.newgrp(&#39;B&#39;), or os.logingroup(&#39;B&#39;). I&#39;m not finding, it, however.</div>

<div><br></div><div><br></div><div>Anyone know this off the top of their head?</div><div><br></div><div>If there&#39;s no library, am I guaranteed to retain the group if I use subprocess? </div><div><br></div><div><br></div>

<div>Cheers,</div><div><br></div><font color="#888888"><div><br></div><div>Glen</div>
</font></blockquote></div><br></div></div>