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 May 17 '12 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.