<tt>This doesn't really look like a PAM question, exactly;  although PAM and 
</tt><tt>whatever calls it will determine which UID and GID your module starts 
</tt><tt>executing as.</tt><tt><br><br>gpg is a bad example;  it's much more paranoid about the (E)UID and 
</tt><tt>(E)GID it runs under.  I don't think sudo will go quite far enough.
</tt><tt>Check the command you're trying to run manually;  run it as root, as a 
</tt><tt>"full" regular user, and as a restricted user like nobody.  You'll 
</tt><tt>probably have to do some additional (E)UID/(E)GID tweaking to get your 
</tt><tt>module running as the correct UID/GID for what you want to accomplish.
</tt><pre style="margin: 0em;">-kgd<br><br></pre>****************<br><pre style="margin: 0em;">FILE *fp<br>fp = popen("sudo gpg -ear....", "r");</pre><br><br>thanks for the reply...but my only problem is adding the 'sudo' in popen.
<br>if i run it without sudo, there's no problem...<br><br>my main concern is how the PAM module will accept that sudo.<br><br><br>the gpg <br clear="all"><br>-- <br>ronald de la cruz