smb.conf 配置

    workgroup = test

    netbios name = nagois

    os level = 33

    security = domain

    realm = sunny.com

    encrypt passwords = yes

    password server = 192.168.0.2

    allow trusted domains = No

    idmap uid = 500-100000000

    idmap gid = 500-100000000

    template shell = /bin/bash

    template homedir = /home/%U

    winbind use default domain = Yes

    winbind offline logon = true

    winbind enum users = No

    winbind enum groups = No

    winbind nested groups = Yes

    winbind separator = /

nsswitch.conf 配置

    passwd:     files ldap winbind

    shadow:     files ldap winbind

    group:      files ldap winbind

加入域

    net rpc join -U administrator@sunny.com

启动winbind 服务

    /etc/init.d/winbind restart

查看用户和组信息

    wbinfo -u

    wbinfo -g