Share user access between two wordpress sites

The short answer: There is no way to share cookie/session info between different domains (this also includes subdomains).

The long answer is, that in your special situation it is possible to build such a construct between to wordpress installs, but this will need some modifications and might impose some security concerns. As this is somehow a more complex task and there are no plugins or tutorials available I could link to, I will just write down how I would approach this task myself.

You would basicly just need to get two parts to get this working:
– find a way to sync the user database, or to access the user database of the other install (you could do this the way Simon suggested).
– for every logged in user add a parameter to the URLs on your page that are leading to the second installation that includes the information which user needs to be logged in, fetch this parameter in installation two and login the user.

To add some security to the whole thing you shouldn’t just build a link like http://www.yyy.com/?uid=4 as everyone who knows this url could easily log in to your wordpress install without any password. I would start with building a ‘session-id’ and store this together with a timeout value which is refreshed on every pageload in the user_meta of the shared/synced user database and then hash this with userid + password + ip + a fixed SALT key shared by both installs. Then you will end up with an more secure version of the url like http://www.yyy.com/?uid=d41d8cd98f00b204e9800998ecf8427e.

This is still no 100% perfect secure method (as there is no way to achieve this in this constellation), but as long as your users are only allowed to post comments (and login via this remote methode is disabled for admins!) I would personally say the risks are acceptable and I guess it could be done in 50 to 100 lines of code in wordpress.