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 Answer 1

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.)

1
  • Correct! As it happens, we had some users input correctly, and some not, which is why I didn't notice. Thanks! May 17, 2012 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .