Help in .netrc

Hi,

I would like to ask if the .netrc file should really be stored/placed in the /home/<userid> directory or in the home directory indicated by the uinfo command?

I am currently having problems with a .netrc file which is owned by a id which has it's home directory pointed to a different directory rather than /home/<userid>

Thanks in advance for any information that you can share.

Thanks!

Never use .netrc files! Major risk, as you end up with unencrypted passwords stored in all users' home directories.

But regarding your question, the .netrc file should be in the directory that is the home directory for the user as specified in the /etc/passwd file (or returned by calls such as getpwent). The /home/<userid> directory is not necessarily <userid>'s home directory.

Thanks blowtorch! This definitely helps!