3

Our server has been locked by a person who haven't logged out after working on it, so now I cannot access it without restart. Can I somehow allow via SSH fast user switching without restarting the system? It's running Snow Leopard.

1
  • I have changed the question to make it more clear.
    – Andy
    Jul 21, 2010 at 18:49

3 Answers 3

7

To turn on Fast User Switching from the command line:

defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool YES

Change to NO to turn it off.

To trigger Fast User Switching from the command line (if necessary):

#Login Window
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

#Specific User
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -switchToUserID UID_OR_SHORT_USERNAME_HERE
2
  • This does nothing for me. Fast user switching is on. The CGSession command produces no output (no error message, no prompt for password, nothing) and does nothing - user is not switched. As a note, I'm trying to do this remotely over SSH if that makes any difference.
    – Michael
    Jul 14, 2013 at 19:00
  • The CGSession command doesn't work with short names. It works with user IDs however. Lookup a user's ID via their short name with id -u usershortname (should be 501, 502, 503, etc). Then use that in the CGSession command. Aug 14, 2014 at 7:37
1

OSX is Unix so you can ssh into it even if someone is logged in - if you have have set in System Preferences->Sharing->Remote Login

If that is not set then you will need to login as admin sitting at the mac to change that - as there is user switching you don't need to log the other person out

1
  • Yeah, that's what I can do. But I also want to log in directly to this computer (not remotely)
    – Andy
    Jun 29, 2010 at 8:33
0

What do you mean with "access"? Access via VNC or Apple Remote Desktop? Do you want to open multiple VNC Sessions?

AFAIK that's not possible.

edit: I found this: http://www.testplant.com/multidesktop.html I hope it helps. It doesn't seem to be very comfortable nor for free.

4
  • would the down-voter please comment on the vote?
    – lajuette
    Jun 8, 2010 at 19:47
  • I didn't vote you down, but generally speaking, requests for more information should be added as comments, rather than answers.
    – coneslayer
    Jun 8, 2010 at 19:50
  • It's correct that the first paragraph is a request for more info. But after that you can find my answer. Two answers to be exact. First my "not possible" and then the app i found after googling for a few minutes.
    – lajuette
    Jun 9, 2010 at 7:37
  • I meant not remote access, but the direct one. Sorry if I call it wrongly, no idea how to say "logging in by using the keyboard of that computer" in one word
    – Andy
    Jun 29, 2010 at 8:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .