如何允许用户在远程 Mac 上快速切换?

And*_*rei 3 ssh authentication remote-access osx-server macos

我们的服务器已被一个在使用它后尚未注销的人锁定,所以现在我无法在不重新启动的情况下访问它。我可以以某种方式允许通过 SSH 快速用户切换而不重新启动系统吗?它正在运行雪豹。

Che*_*ion 7

从命令行打开快速用户切换:

defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool YES
Run Code Online (Sandbox Code Playgroud)

更改为 NO 将其关闭。

从命令行触发快速用户切换(如有必要):

#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
Run Code Online (Sandbox Code Playgroud)