Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
# su - test -c 'echo $HOME'
# vi /etc/passwd
# grep test /etc/passwd
# su - test -c 'echo $HOME'

(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

You must log in to answer this question.

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