🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 网络配置 管理员要根据自己的企业网络环境和规则来配置Mac OS X系统的网络配置。 默认地,Mac OS X支持4个网络设备,Bluetooth, Fireware, Ethernet和Airport. 管理员可以根据自己的需要对他们可以进行各种网络配置,比如:可以禁止某个网络设备,比如Fireware网络等。 #### Location: 它支持自定义的网络位置,用户可以根据不同网络环境,配置不同的网络配置,而这些可以通过定义网络位置来实现适当管理.   [![](image/56a5a83353559.jpg)](http://docs.google.com/File?id=dfm3jbw9_262f8m35tgw_b) 例如上面的就定义了一个Home的自定义网络位置。   #### Sevice Order: 网络设备的顺序也是比较实用的技术,默认的情况如下图:   [![](image/56a5a849261e9.jpg)](http://docs.google.com/File?id=dfm3jbw9_261gvhpbvg8_b) 管理员可以根据不同的位置设置不同网络设备的顺序。   #### **Virtual Interface:** 虚拟接口可以将多个网络设备接口绑定在一起,形成一个虚拟设备,这样可以提供最大的网络速度。   [![](image/56a5a85ef2a68.jpg)](http://docs.google.com/File?id=dfm3jbw9_263d7tbhtcs_b) #### 无线 目前来说比较头痛的是无线网络的预先配置,有的企业可能会因为配置安全需要,不同的地区有不同的无线网络配置,所以管理员需要为客户机,尤其是移动设备,预先配置好无线网络,这在先前的10.4 Tiger系统里面有一个简单的命令行就可以完成设置,而Mac OS XLeopard由于管理方式的改变,它把密码通过系统的Keychain来储存,而无线网络信息,使用com.apple.airport.plist和preference.plist文件来交叉索引管理,目前来说没有提供一个方便的命令行的工具来配置,所以管理员需要预先将所有需要的无线网络添加到系统中。这一点在Snow Leopard中将有改变。 (更新,请参考我的另一篇blog: [Mac OS X: bash脚本实现添加无线SSID(Update2009-10-09)](http://blog.csdn.net/afatgoat/archive/2009/10/08/4640818.aspx)) ### 系统偏好 在配置系统偏好之前,要理解每个配置的"作用域", 也就是说有的偏好设置是硬件相关全局有效的,而有的是和用户相关只作用于客户的局部有效的。下图中蓝绿色覆盖的选项都是全局的,所以需要管理员的权限才能改变。   [![](image/56a5a874bd7b0.jpg)](http://docs.google.com/File?id=dfm3jbw9_266hcfz48gz_b)      这样对于全局偏好,管理员只要设置好之后就是全局有效的,用户也不可能改变,这样的默认设置对于大多数的情况可能适合,但是有的时候并不适合,比如对于Security和ScreenSaver的时间控制,他们是局部有效的,但是有的情况下,管理员需要进行全局控制,没有用户需要有一个同意的配置,这样其中的一个实现方法就是使用登陆脚本进行控制,比如下面的脚本强制设置Require password to wake this computer from sleep orscreen saver, 并设置Screen Saver的时间为30分钟. <table id="juvh" style="width: 100%;" border="1" cellspacing="0" cellpadding="3" bordercolor="#000000"><tbody><tr><td width="100%"><span style="font-family: Courier New; color: #660000;">defaults -currentHost write com.apple.screensaver askForPassword -int 1</span><br style="font-family: Courier New; color: #660000;"/><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">$uniqueID = `ls "$userHomeDir/Library/Preferences/ByHost/" | grep "preference.displays" | cut -d. -f5 | tr -d '/n'`;</span><br style="font-family: Courier New; color: #660000;"/><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">`logger -i "Detected UniqueID: $uniqueID"`;</span><br style="font-family: Courier New; color: #660000;"/><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">$idleTimeConfig = `defaults read "$userHomeDir/Library/Preferences/ByHost/com.apple.screensaver.$uniqueID" | awk '/idle$</span><br style="font-family: Courier New; color: #660000;"/><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">`logger -i "Detected ScreenSaver idleTime: $idleTimeConfig seconds"`;</span><br style="font-family: Courier New; color: #660000;"/><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">if ($idleTimeConfig == 0 || $idleTimeConfig &lt; 1800) {</span><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">    `logger -i "Screensaver idle time is too short... Setting to 1800 seconds (30min)"`;</span><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">    `defaults -currentHost write com.apple.screensaver idleTime -int 1800`;</span><br style="font-family: Courier New; color: #660000;"/><span style="font-family: Courier New; color: #660000;">}</span><br/></td></tr></tbody></table>   #### 用户管理打印机权限 有的情况下,管理员可能需要用户自己控制打印机,具体的方法请参考上面[打印机权限](http://docs.google.com/Doc?docid=0Ad3TN8EWIAm1ZGZtM2pidzlfMjE3cHp4eGZ0ZDY&hl=en#%E6%9D%83%E9%99%90 "打印机权限")的内容。   #### Sharing 在共享里面最重要的是要开启两个,至少一个服务,就是: Remote Login和Remote Management.前面一个支持远程的命令行管理,后面支持ARD的图形界面管理,这两个方法都是管理员最常用的管理方式。   [![](image/56a5a88a77768.jpg)](http://docs.google.com/File?id=dfm3jbw9_2679v4jffcv_b) 注意要精确设置管理员可以管理的项目,如上图。 在Remote Management里面还可以设置系统的一些详细信息,这样在ARD中可以更显然易见地看到每个电脑的配置的不同情况,如下图: [![](image/56a5a8a0463d6.jpg)](http://docs.google.com/File?id=dfm3jbw9_268cb9hkzc9_b)