简体   繁体   English

我可以检测来宾是否正在使用OSX计算机?

[英]Can I detect if a guest is using an OSX machine?

I am writing a tool that will expose an http interface on localhost. 我正在写一个将在本地主机上公开http接口的工具。 I'd like for it to not be available to a guest using the machine. 我希望使用该机器的客人不能使用它。 I'd like to have the tool refuse connections entirely when a guest is logged in. Is this possible? 我想让该工具在访客登录时完全拒绝连接。这可能吗? Is there a way to detect this situation? 有没有办法检测这种情况?

It turns out that guest accounts cannot run concurrently with normal accounts in OSX (at least on recent OSX) so the issue we were concerned about is a non-issue. 事实证明,来宾帐户不能与OSX中的普通帐户(至少在最近的OSX上)同时运行,因此我们担心的问题不是问题。 You could theoretically detect it with w as Mark said in the comments, but it's a thing that won't happen. 从理论上讲,您可以使用w来检测到它,如Mark在评论中所说,但这是不会发生的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检测OSX上正在运行的应用程序 - How can I detect what application is running on OSX 每次我的OSX机器启动时,如何自动完成流浪? - How can I automatically do vagrant up every time my OSX machine boots? 如何使用SpriteKit和Swift检测在OSX开发中的SKSpriteNode上输入的鼠标? - How do I detect mouse entered on a SKSpriteNode in OSX development using SpriteKit and Swift? 如何使用 bash 通过命令行检测 OSX 中的键盘数量? - How do I detect the number of keyboards in OSX through command line using bash? 我想在带有Vagrant的OSX上运行基本的Windows guest虚拟机,但我一直遇到认证失败的问题 - I want to run a basic Windows guest on OSX with Vagrant, but I keep getting authentication failures 如何在OSX中使用Swift发送apikey进行身份验证? - How can I send apikey for authenticaion using Swift in OSX? 如何在OSX中使用Java获得活动的应用程序标题? - How can I get the active application title using Java in OSX? 我可以在OSX中使用EGL吗? - Can I use EGL in OSX? 使用docker-py(OSX)连接到docker-machine - Connect to docker-machine using docker-py (OSX) 在OSX上的多个终端选项卡中使用docker / docker-machine - Using docker/docker-machine in multiple Terminal tabs on OSX
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM