changing the .profile location

Hi Experts,

Can any one guide me to change the .profile location;

My case is; I have two .profile in /DATA/home/x/ as well as /home/x/.

While login system default refers to /home/x/ but I need to change this to /DATA/home/x/.

Please advice. It is urgent...

I see 2 options:

  • Set a different home directory in /etc/passwd
  • Create a softlink from /home/x/.profile to /DATA/home/x/.profile

Hi SB008,

Basically,

I need to remove the reference of profile in /DATA/home/.profile and
change the reference of profile to /DATA/home/x/.profile

Thanks in advance.

The .profile file is read from the current directory once the user logs in. The user's initial directory comes from the /etc/passwd file entry for the user as SB008 pointed out. You need to have the .profile file (or symbolic link) in that directory be the .profie you want for the user.