samba ldap 認証

Samba & LDAP

スキーマのコピー

# cp /usr/share/doc/samba/examples/LDAP/samba.schema /etc/openldap/schema

/etc//openldap/slapd.conf
include /etc/openldap/schema/samba.schema

/etc/samba/smb.conf
security = user
passdb backend = ldapsam:ldap://ldap.example.com
ldap ssl = start tls
ldap suffix = dc=example,dc=com
ldap user suffix = ou=people
ldap group suffix = ou=group
# FYI, the password for this user is stored in
# /etc/samba/secrets.tdb.  It is created by running
# 'smbpasswd -w passwd'
ldap admin dn = uid=samba_servers,ou=people,dc=example,dc=com
nsswitch.conf
libnss_ldap
/usr/lib/libnss_ldap.so.2

LDAPサーバー管理者パスワードをSambaへ登録
# smbpasswd -w secret_password
Setting stored password for "cn=Manager,dc=example,dc=honda,dc=com" in secrets.tdb
確認の方法

表示

smbclient -L host_server

アクセス

$ smbclient //host_server/folder -U scott

Enter scott's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.14]
tree connect failed: NT_STATUS_ACCESS_DENIED


Return

Dec/24/2014 AM 08:15