how to get $HOME for the login user ID when "su" has been used
I need to get the home directory of the login user ID as opposed to the effective user ID (which changes when "su" is used). I can get the login user ID ($USERNAME) but I cannot find a way to get the home directory of a known user that is not the current user. I need a shell command like the c-lib getpwent() function. It must be there somewhere but I cannot find it.
|