Mac OS X 10.5 Leopard: Direcory Utility, The end of Netinfo-程序员宅基地


    其实,在OS X Tiger 10.4中,原来有两个应用程序一个叫NetInfo,一个是Directory Access一个主要用于管理本地用户的,另一个用来设置绑定网络Directory服务的,这次的Directory Utility是把这两个的功能合并了。               
    还有其他的一些相关文章和具体命令使用的文章,相继贴过来,以备查用。

    用户要 注意的是,虽然从本文介绍的来说Leopard绑定AD要比Tiger容易了很多,但是其实依然还有好多问题目前还有待解决,用户很可能需要作一些workaround的工作。   

注:其中的图片和两行代码显示是我加入的。



While the general Mac user community is ooh-ing and ahh-ing over Mac OS X 10.5 features like Time Machine, or opining about the new Dock, Stacks, et al, those of us who support Mac users are deep into learning about one of the biggest below-the-hood changes to happen in any version of Mac OS X: The end of Netinfo.

When I say “end,” I mean it in the most “end-ish” sense. In Mac OS X 10.5, Netinfo is gone. Not “deprecated,” not “hidden away for only the most advanced users.” It’s gone. Deleted. It does not exist. No more Netinfo database, no more Netinfo Utilities such as nicl, no more Netinfo Manager. The entire structure for managing local users, groups, and other such things has been completely replaced by local Directory Services, and the Netinfo Database is now a series of XML files living in /var/db/dslocal/.

Netinfo is—well, was —a directory service used for user and computer management. Originally created for NeXTStep, Netinfo was able toDirectory Utility manage not only individual machines, but entire networks. Its biggest problem was that the rest of the world turned to LDAP for doing the same thing.

Why is the end of Netinfo such an important change? Because when it came to managing local users and groups—that is users you created on your Mac, or network accounts that were mapped to local accounts (a.k.a. mobile accounts)—Netinfo handled all that. When you created a new user in System Preferences, that was all just a nicer interface into Netinfo. When you enabled sharing on your Mac, managing access to shares was handled by Netinfo. Now, it’s all done by Directory Services.

This may seem like a sudden change to some, but the truth is, Apple’s been actively easing Netinfo out of the picture since Mac OS X 10.2. Starting with that release, and continuing into Mac OS X 10.4, Netinfo was reduced from the primary mechanism for managing not just local users and groups, but entire network directories, ala Microsoft’s Active Directory or Novell’s eDirectory, to being only used for local user management. With Mac OS X 10.5, that easing out is complete.

So what does this mean? Well to the average user—whatever that means anymore—not much. The things you used to manage users, file sharing, and so forth are all still there—they just talk to different plumbing. There are some new features in those areas in Mac OS X 10.5, such as the “Advanced Options” in Accounts in System Preferences that allow you to configure a user’s home directory, login shell, add/remove login aliases, and so forth; you used to have to go to Netinfo Manager for these. There’s also the new ability to share any folder on your hard drive, but that could have been done with Netinfo too. The real changes here are in other areas

The most obvious change for most is the death of the Netinfo database. With Mac OS X 10.5, all the Netinfo database information are in a series of plist files in /var/db/dslocal/ under nodes/Default/. Within there, you see a set of directories:


bash-3.2# ls -l Default/
total 0
drwx------ 10 root wheel 340 Oct 11 19:30 aliases
drwx------ 2 root wheel 68 Nov 3 10:15 computers
drwx------ 10 root wheel 340 Nov 13 14:56 config
drwx------ 72 root wheel 2448 Nov 13 08:49 groups
drwx------ 4 root wheel 136 Oct 11 19:30 machines
drwx------ 3 root wheel 102 Oct 11 19:30 networks
drwx------ 44 root wheel 1496 Nov 13 14:11 users


       Note: the above two lines is added by Tony Liu, Nov 18, 2008

Within each of these is a set of plist files where the data for that directory is kept, so in users/, there’s one plist per user, in groups/, one plist per group, and so on. Looking at the entry for the “staff’ group in staff.plist, (staff is the default group for all local users you create in Mac OS X), we see the following:


  
    bash-3.2# cat staff.plist     <?xml version="1.0" encoding="UTF-8"?>     <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"     "http://www.apple.com/DTDs/PropertyList-1.0.dtd">     <plist version="1.0">     <dict>     <key>generateduid</key>     <array>     <string>ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014</string>     </array>     <key>gid</key>     <array>     <string>20</string>     </array>     <key>name</key>     <array>     <string>staff</string>     </array>     <key>passwd</key>     <array>     <string>*</string>     </array>     <key>realname</key>     <array>     <string>Users</string>     </array>     <key>smb_sid</key>     <array>     <string>S-1-5-32-545</string>     </array>     <key>users</key>     <array>     <string>root</string>     <string>tempadmin</string>     <string>jwelch</string>     </array>     </dict>     </plist>


It’s pretty easy to decipher. You have a UUID, or Universally Unique Identifier, a unique number that identifies the group outside of conventional Unix group IDs. You have the GID (or Group ID), the Unix group identifier number, the name of the group, the password for the group, (in this case, there isn't one), the realname (or the more human friendly name), a sid number used for windows file sharing, and then a list of users in this group, including my own, jwelch. If you go looking through all the other plists, they all look like this, more or less.

But so what? Why does anyone care about this stuff? Well, for one, these are all text xml files. You can view or edit them in anything that can handle text files, from Apple’s own Text Edit and Property List Editor, to BBEdit, to Emacs or vi. You don’t need a special database NetInfoapplication to view or work with these files. This makes them more easily maintainable and fixable. It also makes it easier for network administrators to manage local-only accounts on their network. The XML structure of these files makes it easier to integrate the data they contain into various kinds of user management tools, since almost everything out there, commercial and home-built can handle XML data.

Network administrators trying to manage Mac laptops on directories also benefit from the elimination of Netinfo. Prior to Mac OS X 10.5, binding a laptop to a directory was a painful process. Because of the way directory services worked in Mac OS X 10.4 and earlier, if your laptop was bound, or attached to a directory service, and you had to boot up or log in when you couldn’t see the network that directory service was on, you were in a world of pain, and would probably never actually log in, or get anything done. There were a few workarounds, but it was all very wonky, due to how Netinfo and its associated processes—in particular, lookupd—worked. With Mac OS X 10.5, all that is fixed, and now you can have a laptop bound to a directory, and it just works.

For those of you wondering what command line utilities you use, now that all the ni* utilities and lookupd are gone, it’s pretty simple. For general needs, you use dscl. If you want to see what group a user or another group are a member of, or check user/group UUIDs, you use dsmemberutil. To edit, create, manipulate, or delete groups, you use dseditgroup. To work with various Directory Service caches, including LDAP and DNS, you use dscacheutil. Finally, to enable root, you use dsenableroot.

The removal of Netinfo from Mac OS X is a major change from both the operational and historical perspectives. But in end, I think it’s one that was long in coming, and it will make Mac OS X much nicer to deal with from the administrator point of view—something that will aid Apple as it continues to establish a greater presence in the business world.

[ John C. Welch is a Unix/Open Systems Administrator for Kansas City Life Insurance and a long-time Mac IT pundit. ]


原文链接: http://blog.csdn.net/afatgoat/article/details/3332017

转载于:https://my.oschina.net/junwong/blog/46618

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/chengyixian7877/article/details/100993883

智能推荐

[国产MCU]-W801开发实例-MQTT客户端通信_mcumq-程序员宅基地

文章浏览阅读983次。MQTT 被称为消息队列遥测传输协议。它是一种轻量级消息传递协议,可通过简单的通信机制帮助资源受限的网络客户端。与大多数消息系统不同,我们不必为 MQTT 客户端分配地址。MQTT 使用基于主题的简单发布/订阅通信。该协议运行在 TCP/IP 之上,以提供可靠的数据传输。本文将详细介绍如何在W801中使用MQTT协议通信。_mcumq

微星主板怎么改内存时序_采用海力士颗粒,能轻松上4000MHz,十铨VULCAN Z DDR4内存条体验...-程序员宅基地

文章浏览阅读609次。就在上个月,618期间,十铨内存条扮演好几次价格屠夫的角色。例如把8G*2 3000MHz的RGB灯条套装,直接拉到了500以下。性能更强的十铨夜鹰RGB系列,也降到了550左右。更可怕的是,高频内存十铨王者之剑3600MHz,也被拉到了800以下。不得不说,十铨这一系列动作,为618增色不少。当然除了灯条之外,在非灯条方面,十铨也是发力明显,我印像深的就是,把8GB DDR4 3000的火神系列..._微星主板内存压时序

探索游戏开发新边界:Anything About Game —— 一站式游戏开发资源库-程序员宅基地

文章浏览阅读825次,点赞14次,收藏14次。探索游戏开发新边界:Anything About Game —— 一站式游戏开发资源库项目地址:https://gitcode.com/killop/anything_about_game项目链接在游戏开发的世界中,寻找合适的工具、教程和资源往往是一项艰巨的任务。幸运的是,我们有了 Anything About Game,这是一个精心策划的开源项目,旨在为游戏开发者提供全方位的学习和参考资...

CentOS5.4 安装过程(图解)_centos 5.4安装过程-程序员宅基地

文章浏览阅读4.4k次。CentOS5.4 安装过程(图解) 一:虚拟机配置:网络连接选择桥接模式 二:开始安装CentOS5.4进入CentOS安装界面,直接回车。注意:如果你实际机器的内存是512或者是更低,将会提示你内存不足以支持图形界面安装,一般玩技术最好是安装2G内存或者更高 三:输入回车键以后将进入光驱检查界面:如果你存在光驱的话依旧选择OK,如果_centos 5.4安装过程

makefile学习(1)-程序员宅基地

文章浏览阅读73次。GNU Make / Makefile 学习资料GNU Make学习总结(一)GNU Make学习总结(二)这篇学习总结,从一个简单的小例子开始,逐步加深,来讲解Makefile的用法。最后用上面总结过的知识,给出了一个通用的C/C++ Makefile文中提到《GNU 项目管理》一书,有280页。我觉得初学没必要看这么厚的书。豆瓣上对其评价也是不太实用。等以后有更深...

信息学奥赛一本通C++语言——1177:奇数单增序列_给定一个长度为 n(不大于 500 )的正整数序列,请将其中的所有奇数取出,并按升序输-程序员宅基地

文章浏览阅读514次。给定一个长度为N(不大于500)的正整数序列,请将其中的所有奇数取出,并按升序输出。结合结构体与排序,非常简单的题目,直接上代码,只是最后的‘,’需要注意一。增序输出的奇数序列,数据之间以逗号间隔。数据保证至少有一个奇数。第2行为 N 个正整数,其间用空格间隔。_给定一个长度为 n(不大于 500 )的正整数序列,请将其中的所有奇数取出,并按升序输

随便推点

前后台切换时闪屏处理_畅享10s切换电话会闪屏-程序员宅基地

文章浏览阅读4.2k次。这两天做一个collectionView的视图用来实现一个日历遇到一个问题。 问题1.是我在加载日历的时候因为collectionview所需要加载的东西比较多,能看出来有些卡顿,所以我就在其他视图加载成功后延迟了0.5s后对collectionview进行加载,这样能感觉出来有一定的层次感,但是不至于卡顿的现象出现; 问题2.也是在这个页面,我在双机home键的时候,监听程序的生命周期变化,在_畅享10s切换电话会闪屏

C语言循环与分支不会用?来看看!-程序员宅基地

文章浏览阅读880次,点赞53次,收藏33次。在C语言中,结构可以分为三种,分别是:循环结构、选择结构、顺序结构。即自上而下按进行。

matlab两矩阵相似性,两个矩阵同时相似对角化MATLAB程序.docx-程序员宅基地

文章浏览阅读1.4k次。两个矩阵同时相似对角化MATLAB程序摘 要:使用Matlab语言设计出实现两个复矩阵同 时相似对角化的计算机程序。关键词:同时相似对角化;Mat lab;程序矩阵对角化是重要的数学方法,但因其计算过程繁琐, 人们往往望之生畏,尤其是多个矩阵同时对角化问题,因此 本文设计出判断及计算两个复矩阵能否同时相似对角化的 Mat lab程序,用此能够方便地解决两个复矩阵同时相似对角 化问题。1.理论基础定..._matlab矩阵相似对角化代码

c语言 第八周编程在线,第八周编程作业-程序员宅基地

文章浏览阅读201次。这个作业属于哪个课程C语言程序设计这个作业要求在哪https://edu.cnblogs.com/campus/zswxy/computer-scienceclass3-2018/homework/3078我在这个课程的目标是学习字符串的几种函数以及内存动态分配并解决实际问题这个作业在哪个具体方面帮助我实现目标多练习,学会用所学知识去解决实际问题参考文献《C语言程序设计》函数实现字符串逆序本题要求..._c语言程序设计教学第八周上机作业

基于java SDK语音识别技术概述与调研_语音识别会限调用次数吗为什么-程序员宅基地

文章浏览阅读904次。语音识别技术概述与调研语音识别已经成为人工智能应用的一个重点,通过语音控制设备简单方便,在各个领域兴起了研究应用的热潮。数据、算法及芯片是语音识别技术的3个关键,大量优质的数据、精准快速的算法和高性能语音识别芯片是提升语音识别的核心。语音是人工智能产品的主要入口,乃兵家必争之地也。相关算法研究日新月异,CNN RNN CLRNN HMM LACE等模型都尤其优势,将多种算法综合运用修改更佳。一..._语音识别会限调用次数吗为什么

Java自学心得,让你快速入门技巧(1)-程序员宅基地

文章浏览阅读918次,点赞12次,收藏21次。为什么我不完全主张自学?①平台上的大牛基本上都有很多年的工作经验了,你有没有想过之前行业的门槛是什么样的,现在行业门槛是什么样的?以前企业对于程序员能力要求没有这么高,甚至十多年前你只要会写个“Hello World”,你都可以入门这个行业,所以以前要入门是完全可以入门的。②现在也有一些优秀的年轻大牛,他们或许也是自学成才,但是他们一定是具备优秀的学习能力,优秀的自我管理能力(时间管理,静心坚持等方面)以及善于发现问题并总结问题。

推荐文章

热门文章

相关标签