I have two users, that have the same home directory:
useradd -m -d /home/mydir user1
useradd -m -d /home/mydir user2
and they are in the same group.
But I have a problem, when someone logged in the shell, in mydir appears the .bash_history
file, of the first user with the commands he made.
Then if the user2 joins and start to make commands, the .bash_history
remains of the first user with his commands. Is it possible to create bash history for both users?
.xsession-errors
and.ICEauthority
that haverw- --- ---
as setting. Not going to work with 2 users.ssh
, or the two users are security-equivalent because of.ssh/authorized_keys
. There's probably more takeover methods as well. Typically stuff like this appears only when the home directory is owned by root and writable by neither. I can't imagine what you're trying to accomplish.