cancel
Showing results for 
Search instead for 
Did you mean: 

pam

christian_derek
Regular Advisor

pam

Hi,

We are using pam to validate the user access to the system and if it succeed we launch a process on the hpux. The $HOME variable is not set, what should we do to solve the issue.

thanks,
2 REPLIES
Horia Chirculescu
Honored Contributor

Re: pam

Hello,

The $HOME variable is set by the login process.

If you do not have a login session, this variable would not be set.

Other possibility is that the process spanned from the shell can not read correctly the above variable.

Best regards
Horia.
Best regards from Romania,
Horia.
Matti_Kurkela
Honored Contributor

Re: pam

If you're writing a custom PAM module or other binaries, use the standard getpwnam() or getpwuid() functions to look up the home directory.

(use the "man getpwnam" command to get more information)

After that, you can set the HOME variable yourself if you need it.

If you're writing a script, use the "pwget" command to get similar functionality.

("man pwget")

For example:
HOME=$(pwget -n username | cut -d : -f 6)

MK
MK