How can one let two users share the same home directory in Xubuntu 20.04

I want to create two users (e.g. adm1 and adm2), because each of them wants his own password, to which he is used. They shall share the same home directory however, let's call that admx.

Is this possible?

If it is: How does one achieve it?

(of course they both will belong to the same group=admx)


I would not recommend using the same home directory for multiple users, because important config files are located in the home directory. These are read and written by various programs which may cause conflicts between users. Plus some of these files need to be accessible only by one user, otherwise the related program will refuse to work. It's better to create a subdirectory within one user's home directory that will be used by both users, and symlink that subdirectory in other user's home directory. Of course the subdirectory needs to be group writable by group admx and have the setgid bit set, so both users can create files within this directory and they will be automatically assigned to the group.

For convenience, you may put a cd command that changes to this subdirectory in each user's .profile file, so after login both users will start in that subdirectory and not in their home directory.