【问题标题】:terminal command to change Security and Privacy Advanced Setting更改安全和隐私高级设置的终端命令
【发布时间】:2016-10-18 08:09:07
【问题描述】:

http://cdn.osxdaily.com/wp-content/uploads/2013/03/automatic-log-out-mac.jpg (我要检查的设置图片)

我正在尝试弄清楚如何使用终端命令来检查该设置和时间限制。我必须使用终端,因为我正在尝试将其放入我的映像中以便部署它。

Mac El Capitan 系统偏好设置 > 安全和隐私 > 高级 > “在 90 分钟不活动后退出。

问题:如何从终端更改该设置。

提前致谢

【问题讨论】:

    标签: macos command-line terminal


    【解决方案1】:

    设置在这个文件中:/Library/Preferences/.GlobalPreferences

    它(奇怪地)由两个键控制:

    com.apple.autologout.AutoLogOutDelay

    com.apple.securitypref.logoutvalue

    您必须同时设置它才能在系统偏好设置中正确显示(您还必须退出并重新启动以获取更新的设置)。

    查看当前设置(如果有的话):

    defaults read /Library/Preferences/.GlobalPreferences com.apple.autologout.AutoLogOutDelay
    defaults read /Library/Preferences/.GlobalPreferences com.apple.securitypref.logoutvalue
    

    要将值更改为一小时(3600 秒):

    sudo defaults write /Library/Preferences/.GlobalPreferences com.apple.autologout.AutoLogOutDelay -int 3600
    sudo defaults write /Library/Preferences/.GlobalPreferences com.apple.securitypref.logoutvalue -int 3600
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-25
      • 2012-10-09
      • 1970-01-01
      • 2021-11-02
      • 1970-01-01
      • 2013-07-05
      相关资源
      最近更新 更多