bash – How to open another user’s folder from terminal

I used to be able to use one of these commands to switch to another user account (my own) to work on it.

john$ login admin
password:

admin$ open .
LSOpenURLsWithRole() failed with error -610 for the file /Users/admin/.

I have tried other methods as well.

john$ su - admin
john$ exec su - admin
john$ sudo -u admin bash

They all result in the same error. I understand it’s a security restriction. The question is what rules are restricting this? I do have the password shouldn’t I be allowed, once signing in, access to those files?

What can I do to gain access as if I am in that user account?


EDIT

Also tried:

john$ ssh admin@localhost
Password:
admin$ open .
LSOpenURLsWithRole() failed with error -610 for the file /Users/admin.