3

Whenever I su to user X, it always starts in user Y home directory. The biggest issue is that then X doesn't run its .bash_profile, it attempts Y's and fails. I'm guessing it's just a typo in how the user was defined, but don't know where that is. This is on Red Hat.

How do I change the user's starting directory or otherwise fix these symptoms?

Adam
  • 276
  • 1
  • 3
  • 8

1 Answers1

3

Try su -l $userX to, "Provide an environment similar to what the user would expect had the user logged in directly."

Jeff Ferland
  • 20,547
  • 2
  • 62
  • 85