I have appuser01 and appuser02 accounts and home dir /appuser01 as homedir for user appuser01. I'd like to have the same homedir /appuser01 for user appuser02 as well, but user appuser02 should use different profile file. The intention is to have different env variables for different users but in the same folder. Please let me know the best option to handle this.
Asked
Active
Viewed 1,466 times
1 Answers
1
If you want these users to share a directory, have them share a directory outside of of their home directory. When linux logs into an account, it checks the accounts' home directory for any relevant dot files (.bashrc, .bash_profile, .profile, etc) and loads those files. If you have two users who share the same home directory, they will be forced to use the same dot files.
If you absolutely have to have the users share the same home directory, youre going to have to edit those dot files to do a lot of:
if [ "$(whoami)" == appuser01 ]; then
env1=value
fi

R4F6
- 782
- 1
- 9
- 26