1
Where does the HOME variable get set in RHEL6 (SL6.1)?
On one system all users get HOME set to /home/username/, i.e. with the trailing slash, which I don't want, so I need to remove it.
1
Where does the HOME variable get set in RHEL6 (SL6.1)?
On one system all users get HOME set to /home/username/, i.e. with the trailing slash, which I don't want, so I need to remove it.
1
That variable should be set from the corresponding field in /etc/passwd
. You should clean that up in there.
# grep test /etc/passwd
test:x:1001:1001::/home/test/:/bin/bash
# su - test -c 'echo $HOME'
/home/test/
# vi /etc/passwd
# grep test /etc/passwd
test:x:1001:1001::/home/test:/bin/bash
# su - test -c 'echo $HOME'
/home/test
(You should probably use usermod
to update /etc/passwd
rather than editing it directly.)
Correct! As it happens, we had some users input correctly, and some not, which is why I didn't notice. Thanks! – Duncan Macleod – 2012-05-17T17:28:54.347