Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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