As Good A Place As Any
Tim Thomas's Blog
Solaris CIFS Windows SID 映射初探
本文承接在 Domain 模式下配置 OpenSolaris CIFS 服务器一文。映射共享时,系统询问我在 Workgroup 模式下的用户 ID 和密码..所以,如何处理文件和文件夹所有权和权限呢?
Solaris CIFS 实现包括 ID Mapping Services。这些服务允许您显式地将 Windows Security IDentifiers 映射到所需的 Solaris User ID 和 Group ID,但如果您没有设置显式的映射,则 ID Mapping Service 将为 Windows User 生成 Ephemeral Solaris User ID 和 Group ID。Solaris CIFS Administrators Guide 中讨论了 Identity Mapping 战略。
上一个练习结尾时创建的文件和目录的权限在 Solaris 中列出时如下所示...
root@isv-x4500b # pwd
/tank/cifs1
root@isv-x4500b # ls -l
total 10
d---------+ 2 2147483649 2147483650 2 Apr 8 05:49 user1
----------+ 1 2147483649 2147483650 0 Apr 8 05:57 user1.txt
d---------+ 2 2147483650 2147483650 3 Apr 8 05:50 user2
----------+ 1 2147483650 2147483650 0 Apr 8 05:51 user2.txt
这看起来有一点奇怪,因为 OpenSolaris CIFS 服务使用 ZFS ACL,但它们没有显示在上述列表中。我们可以转储当前的 ID Mapping,如下所示...
root@isv-x4500b # idmap dump
usid:S-1-5-21-500772251-2770406677-2360070262-1125 == uid:2147483650
usid:S-1-5-21-500772251-2770406677-2360070262-1113 == uid:2147483649
gsid:S-1-5-21-500772251-2770406677-2360070262-513 == gid:2147483650
gsid:S-1-5-21-500772251-2770406677-2360070262-512 == gid:2147483651
gsid:S-1-5-11 == gid:2147483652
gsid:S-1-5-2 == gid:2147483653
gsid:S-1-5-32-544 == gid:2147483654
我们可以看到,Windows SIDs 已经映射到 Solaris User 和 Group ID。用户的映射已经动态创建 (Ephemeral ID Mapping);Windows Group SID 映射由系统级交互生成,您可以使用此处的列表将其解码。我们可以看到:
Windows Group SID xxxxxx-513 = Domain Users = Solaris GID 2147483650
Windows Group SID xxxxxx-512 = Domain Admins = Solaris GID 2147483651
Windows Group SID xxxxxx-11 = Authenticated Users = Solaris GID 2147483653
Windows Group SID xxxxxx-2 = Network (Users logged in via the Network) = Solaris GID 2147483651
Windows Group SID xxxxxx-544= Administrators = Solaris GID 2147483654
现在我们可以知道,创建的文件和目录在映射到 Solaris GID 2147483650 时位于 Domain Users 组中。
不久,我将深入探讨所有内容,本文只是初探。
更多信息
OpenSolaris Project:CIFS Server 主页
Open Solaris CIFS Documentation,包括 Solaris CIFS Administrators Guide & Troubleshooting Information
此外,请考虑加入 Open Solaris Storage Discuss Forum
Posted at 09:00AM May 02, 2008 in Storage |