HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
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