在Windows Active Directory域中的Linux计算机(Debian),AD的pipe理员login后应具有root权限

我设法join我的Debian机器(Squeeze)到现有的活动目录(MS Windows 2008 R2服务器)。 一切工作正常,我可以login使用Active Directory帐户(NTP,Kerberos,PAM,Samba和Winbind都configuration好,看起来状态良好)。

问题:我想将Active Directory映射到UNIX组,如下所示

  • 域pipe理员(RID 512) – > root(gid 0)
  • 域用户(RID 513) – >用户(gid 100)

我想实现两个目标:

  1. 由任何用户创build的目录和文件(包括自动创build的主文件夹)应该有gid = 100

    此刻gid = 10000,winbind采取的自动gid被采取)

  2. 域pipe理员组成员login后应具有root权限(或者:是wheel组的成员)

    目前,Domain-Admins组的成员既不是gid = 0的成员,也不是轮盘组(在我的Debian安装中不存在,但这是另一个问题)。

为了实现这些目标,我试图设置下面的映射

  • net groupmap add ntgroup =“Domänen-Admins”unixgroup = root rid = 512 type = domain
  • net groupmap add ntgroup =“Domänen-Benutzer”unixgroup = users rid = 513 type = domain

这种方法不成功,既不提供SID,也不提供RID。 对于每种方法,我都确保winbindcaching是空的(net cache flush),samba和winbind服务都重新启动。

任何build议? 您的支持是高度赞赏! (我知道有一些Debian的大师已经解决了这样的情况;-))

问候,沃尔夫勒姆


另外一些用户请求的信息syneticon-dj:

SIDs是scambled

root@S15:~# net getdomainsid SID for local machine S15 is: S-1-5-21-aaaaaaaaaa-bbbbbbbbbb-ccccccccc SID for domain ITSL is: S-1-5-21-dddddddddd-eeeeeeeeee-ffffffffff root@S15:~# net groupmap add ntgroup="Domänen-Admins" unixgroup=root rid=512 type=domain Successfully added group Domänen-Admins to the mapping db as a domain group root@S15:~# net groupmap add ntgroup="Domänen-Benutzer" unixgroup=users rid=513 type=domain Successfully added group Domänen-Benutzer to the mapping db as a domain group root@S15:~# net groupmap list Domänen-Admins (S-1-5-21-aaaaaaaaaa-bbbbbbbbbb-ccccccccc-512) -> root Domänen-Benutzer (S-1-5-21-aaaaaaaaaa-bbbbbbbbbb-ccccccccc-513) -> users 

对我来说,似乎是错误的组帐户映射。 我的意思是映射的SID对应于本地机器SID而不是域SID。 无论如何,这是行不通的,即目标1没有实现。

我还没有find任何强制select域SID的选项。 因此,我清除了组图,并直接将组映射添加到组SID中,如下所示:

 root@S15:~# net groupmap add ntgroup="Domänen-Benutzer" unixgroup=users sid="S-1-5-21-dddddddddd-eeeeeeeeee-ffffffffff-513" type=domain Successfully added group Domänen-Benutzer to the mapping db as a domain group root@S15:~# net groupmap list Domänen-Benutzer (S-1-5-21-dddddddddd-eeeeeeeeee-ffffffffff-513) -> users 

这种方法也行不通,即目标1没有实现。

按照要求,这里是smb.conf的摘录:

 [global] workgroup = ITSL realm = itsl.local security = ADS # This machine is a member server, hence no authentication and we leave the following line commented ; domain logons = yes idmap uid = 10000-20000 idmap gid = 10000-20000 template shell = /bin/bash ; winbind enum groups = yes ; winbind enum users = yes winbind use default domain = yes 

根据要求,这里是PAMconfiguration的摘录:

Debian Squeeze的默认设置,我没有任何改变。

 root@S15:/etc/pam.d# grep 'winbind' * common-account:account [success=1 new_authtok_reqd=done default=ignore] pam_winbind.so common-auth:auth [success=1 default=ignore] pam_winbind.so krb5_auth krb5_ccache_type=FILE cached_login try_first_pass common-password:password [success=1 default=ignore] pam_winbind.so use_authtok try_first_pass common-session:session optional pam_winbind.so common-session-noninteractive:session optional pam_winbind.so 

问候,沃尔夫勒姆

你不应该试图把uid映射到root,也不gid这种方式来映射gid

如果你在系统上给予pipe理员root权限,你可以使用sudo。 您可以使用Windows组授予sudo权限(域pipe理员)。