题:
我想将Active Directory组映射到UNIX组,如下所示
> Domain-Admins(RID 512) – >根(gid
0)
>域用户(RID 513) – >用户
(gid 100)
我想实现两个目标:
>任何用户创建的目录和文件(包括自动创建的主文件夹)都应该具有gid = 100
目前gid = 10000,winbind采取的自动gid,被采取)
> Domain-Admins组的成员在登录后应具有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确实有帮助.对于每种方法,我确保winbind缓存为空(网络缓存刷新),并重新启动samba和winbind服务.
有什么建议?
非常感谢您的支持! (我知道有一些Debian大师已经解决了这样的场景;-))
此致,Wolfram
此外,用户syneticon-dj请求的一些信息:
SID被骗了
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没有实现.
我没有找到任何强制选择域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
根据要求,以下是PAM配置的摘录:
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
此致,Wolfram
如果要在系统上授予管理员root权限,则可以使用sudo.您可以使用Windows组授予sudo权限(Domain-Admins).