heir passwordto attrs=userPassword, sambaNTPassword, sambaLMPassword, sambaPwdMustChange, sambaPwdLastSetself writeanonymous auth * none
# those 2 parameters must be world readable for password aging to work correctly
# (or use a priviledge account in / etc / ldap.conf to bind to the directory) to attrs=shadowLastChange, shadowMaxself write * read
# all others attributes are readable to everybodyto ** read
# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
# access to dn=«. *, ou=Roaming, o=morsnet»
# by dn=«cn=admin, dc=example, dc=com» write
# by dnattr=owner write
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Specific Directives for database # 2, of type «other» (Can be hdb too):
# Database specific directives apply to this databasse until another
# «database» directive occurs
# database
# The base of your directory for database # 2
# suffix «dc=debian, dc=org»
Самої схеми самби за замовчуванням немає, треба взяти Із прікладів.
# zcat / usr / share / doc / samba-doc / examples / LDAP / samba.schema.gz>/Etc / ldap / schema / samba.schema
Для вставки хешу пароля вікорістовуємо команду
# slappasswd-h {MD5}
Підклалі конфіг, можна пробувати стартуваті Slapd:
# slapindex
# chown-R openldap: openldap / var / lib / ldap
# service slapd start
5) налаштування Samba
налаштування проводимо у / etc / samba / smb.conf:
dos charset=CP1251charset=UTF8charset=UTF8=LDAP=OpenLDAPstring =% h server
# interfaces=eth0: 1 # # Необхідно поправити на свій інтерфейс, або взагалі прибрати
# bind interfaces only=Yes # # Прибрати, якщо немає певного інтерфейсу на самбуto guest=Bad Userbackend=ldapsam: ldap :/ / 127.0.0.1/password change=Yesprogram=/ usr / sbin / smbldap-passwd-u% uchat=* New * password *% n n * Retype * new * password *% n n * all * authentication * tokens * updated *=0server=Yesfile=/ var / log / samba / log. % mlog size=1000options=TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192user script=/ usr / sbin / smbldap-useradd-m% u-d / domain / home /% u% uuser script=/ usr / sbin / smbldap-userdel% u-r% ugroup script=/ usr / sbin / smbldap-groupadd-p% ggroup script=/ usr / sbin / smbldap-groupdel% guser to group script=/ usr / sbin / smbldap-groupmod-m% u% guser from group script=/ usr / sbin / smbldap-groupmod-x% u% gprimary group script=/ usr / sbin / smbldap-usermod-g% g% umachine script=/ usr / sbin / smbldap-useradd-w% u
# logon script=logon.bat
# # logon path=% N profiles % U # # Розкоментувати, якщо потрібні стерпні профіліlogons=Yeslevel=10master=Y...