欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

mac macos 如何查看用户是 wheel 组还是 admin 组 还是staff 组 有大用

要查看用户是 wheel 组还是 admin 组还是staff 组,可以在 macOS 终端中使用以下命令:

  1. 查看用户的 wheel 组:

shell

dseditgroup -o checkmember -m username wheel
  1. 查看用户的 admin 组:

shell

dseditgroup -o checkmember -m username admin
  1. 查看用户的 staff 组:

shell

dseditgroup -o checkmember -m username staff

其中,将 "username" 替换为要查询的用户名。如果用户属于相应的组,命令将返回 "yes";如果用户不属于相应的组,命令将返回 "no"。


普通分类: