I manage a bunch of laptops in my household, and while I can do most things over SSH, sometimes I just need to physically sit down at someone's logged-in desktop environment. If the user is around, I can always "Hey, come log in for me;" but sometimes they're not around, and I end up having to fiddle with /etc/shadow to set their password to mine, log in, then restore shadow.
What I'd really like is the ability to use root's password (or better yet any admin's password) to log into a desktop as any user. I've read the man pages for every pam_ library on the system, and the only one that even seems to come close to what I'm after is pam_userdb: configuring a secondary password database with all the normal users but with the administrative password; but that's still hacky.
I've looked at the configuration guides for both lightdm and gdm, and I don't see anything about this. I've briefly looked at polkit, but frankly I have no idea what that thing is doing.
Edit: "logged-in" was probably a bad way to phrase it - I meant accessing the user's full desktop environment, not just accessing a single app.