OpenLDAPユーザーとSambaを共有する

OpenLDAPユーザーとSambaを共有する

次の設定が必要です。

ユーザーが保存される OpenLDAP サーバー。

OpenLDAPユーザーがアクセスする必要があるSamba共有を持つファイルサーバー。

OpenLDAPユーザーはすでに多数のサービス(Owncloud、Mediawikiなど)にアクセスできます。

私たち欲しくないドメインコントローラがあります(ドメインコントローラが間違った単語だと思いますか?)。すべてのサーバーはスタンドアロンサーバーであり、ほとんどのサーバーにはrootユーザーに加えてローカルユーザー(James)が1人しかいません。従業員クライアントコンピュータもローカルユーザーであり、ドメインの一部ではありません。

もちろんグーグルもたくさんやってみてたくさん試してみたけど..

私がしたこと:

samba.ldifをインポートし、OpenLDAPサーバーにインデックスを作成します。

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/samba.ldif

OpenLDAP サーバーに smbldap-tools をインストールして構成します。

smbldap-populate >> no errors, a lot of Groups etc are created

ユーザーを作成しました

smbldap-useradd -a -P foo.bar

ファイルサーバーのsmb.confを次のように変更します。

[global]
        workgroup = BEER
        security = user
        passdb backend = ldapsam:ldap://<IP>
        ldap suffix = dc=foo,dc=bar
        ldap user suffix = ou=People
        ldap group suffix = ou=Group
        ldap machine suffix = ou=Hosts
        ldap idmap suffix = ou=Idmap
        ldap admin dn = cn=Manager,dc=foo,dc=bar
        #ldap ssl = start tls
        ldap ssl = no
        ldap passwd sync = yes
#       passdb backend = tdbsam
        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

LDAP管理者パスワードも追加されましたsmbpasswd -w XXXXXXXXXX

Apache DSの新しいユーザーと二人(?)SambaDomainNameエントリ - > BEERとFILESERVER.. 2つの異なるSIDがあり、新しいユーザーはBEERドメイン名のSID-UIDを取得します。 BEERドメインは私が手動で作成しました。 (HowToで読む)

FILESSERVER エントリーを削除してファイル・サーバーから Samba サーバーを再始動すると、そのエントリーが再生成されます。

また、Samba共有にアクセスしようとすると、ユーザーfoo.barはログインできません。

私はOpenLDAPとSambaに初めて触れたことがわかりません...

サンバログ:

    [2017/02/28 10:42:19.698686,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'smbd' finished starting up and ready to serve connections

OpenLDAPサーバーのLDAPログ

Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 fd=37 ACCEPT from IP=<IP>:60550 (IP=0.0.0.0:389)
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=0 BIND dn="cn=Manager,dc=foo,dc=bar" method=128
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=0 BIND dn="cn=Manager,dc=foo,dc=bar" mech=SIMPLE ssf=0
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=0 RESULT tag=97 err=0 text=
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=1 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=1 SRCH attr=supportedControl
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=2 SRCH base="dc=foo,dc=bar" scope=2 deref=0 filter="(&(uid=foo.bar)(objectClass=sambaSamAccount))"
Feb 28 10:46:01 OpenLDAP01 slapd[801]: conn=1058 op=2 SRCH attr=uid uidNumber gidNumber homeDirectory sambaPwdLastSet sambaPwdCanChange sambaPwdMustChange sambaLogonTime sambaLogoffTime sambaKickoffTime cn sn displayName sambaHomeDrive sambaHomePath sambaLogonScript sambaProfilePath description sambaUserWorkstations sambaSID sambaPrimaryGroupSID sambaLMPassword sambaNTPassword sambaDomainName objectClass sambaAcctFlags sambaMungedDial sambaBadPasswordCount sambaBadPasswordTime sambaPasswordHistory modifyTimestamp sambaLogonHours modifyTimestamp uidNumber gidNumber homeDirectory loginShell gecos

ベストアンサー1

おすすめ記事