Настройка клиента ПСПО для работы с eBoxСервер на котором установлен eBox ip=192.168.15.254, созданный домен SampleDomain, клиент на котором установлен ПСПО mehost
СерверДобавляем в конфиг самбы для корректного отображения кириллицы
[global]
dos charset = CP866
display charset = UTF-8
unix charset = UTF-8
.....
также чтоб затем при добавлении или изменении шар не происходило перезаписи
/usr/share/ebox/stubs/samba/smb.conf.mas, сразу после вхождения [global] эти же строки
.....
</%init>
[global]
dos charset = CP866
display charset = UTF-8
unix charset = UTF-8
.....
КлиентУстанавливаем необходимое ПО. (nss-ldap, pam-ldap samba-client,smbldap-tools, openldap), может чего лишнего или не хватает не помню (завтра на коиенте посмотрю что установлено).
Cоздаем файл /etc/ldap.secret выставляем на него права 600 и вписываем в него пароль, который можно посмотреть на сервере в /etc/ldap/slapd.conf из параметра rootpw
Затем исправляем /etc/ldap_pam.conf
# network or connect timeouts (see bind_timelimit).
# host 127.0.0.1
# The distinguished name of the search base.
base dc=ebox
# Another way to specify your LDAP server is to provide an
# uri with the server name. This allows to use
# Unix Domain Sockets to connect to a local LDAP Server.
uri ldap://192.168.15.254/
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
bind_policy soft
# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
rootbindn cn=admin,dc=ebox
nss_base_passwd ou=Users,dc=ebox?one
nss_base_passwd ou=Computers,dc=ebox?one
nss_base_shadow ou=Users,dc=ebox?one
nss_base_group ou=Groups,dc=ebox?one
и /etc/nss_ldap.conf
# network or connect timeouts (see bind_timelimit).
# host 127.0.0.1
# The distinguished name of the search base.
base dc=ebox
# Another way to specify your LDAP server is to provide an
# uri with the server name. This allows to use
# Unix Domain Sockets to connect to a local LDAP Server.
uri ldap://192.168.15.254
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
bind_policy soft
# The distinguished name to bind to the server with
# if the effective user ID is root. Password is
# stored in /etc/ldap.secret (mode 600)
rootbindn cn=admin,dc=ebox
nss_base_passwd ou=Users,dc=ebox?one
nss_base_passwd ou=Computers,dc=ebox?one
nss_base_shadow ou=Users,dc=ebox?one
nss_base_group ou=Groups,dc=ebox?one
исправляем /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat ldap
group: compat ldap
shadow: compat ldap
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
Правим конфиг самбы /etc/samba/smb.conf
[global]
unix charset = UTF-8
dos charset = cp866
display charset = UTF-8
workgroup = SAMPLEDOMAIN
netbios name = MEHOST
security = DOMAIN
log level = 1
syslog = 0
log file = /var/log/samba/%m
max log size = 50
smb ports = 137 138 139 445
name resolve order = wins bcast hosts
printcap name = CUPS
wins server = 192.168.15.254
ldap suffix = dc=ebox
ldap machine suffix = ou=Computers
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap admin dn = cn=admin,dc=ebox
idmap backend = ldap:ldap://192.168.15.254
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind trusted domains only = Yes
printing = cups
Остается только настроить pam, рекомендуется сделать бэкап изменяемых файлов
/etc/pam.d/sshd
#%PAM-1.0
auth required pam_userpass.so
auth sufficient pam_ldap.so use_first_pass
auth required pam_tcb.so shadow fork prefix=$2a$ count=8 nullok nodelay blank_nolog use_first_pass
auth required pam_nologin.so
account include system-auth
password include system-auth
session include system-auth
/etc/pam.d/system-auth
#%PAM-1.0
auth sufficient /lib/security/pam_ldap.so
auth required pam_tcb.so shadow fork prefix=$2a$ count=8 nullok use_first_pass
account sufficient /lib/security/pam_ldap.so
account required pam_tcb.so shadow fork use_first_pass
password required pam_passwdqc.so min=disabled,24,12,8,7 max=40 passphrase=3 match=4 similar=deny random=42 enforce=users retry=3
password sufficient /lib/security/pam_ldap.so use_authtok
password required pam_tcb.so use_authtok shadow fork prefix=$2a$ count=8 write_to=tcb use_first_pass
session optional /lib/security/pam_ldap.so
session required pam_tcb.so
session required /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0077
session required pam_limits.so
/etc/pam.d/system-auth-use_first_pass
#%PAM-1.0
auth sufficient /lib/security/pam_ldap.so use_first_pass
auth required pam_tcb.so shadow fork prefix=$2a$ count=8 nullok use_first_pass
password sufficient /lib/security/pam_ldap.so use_first_pass
password required pam_tcb.so use_authtok shadow fork prefix=$2a$ count=8 write_to=tcb
Присоедиямся к домену
net join -U admin
Вроде все.
PS еще раз делайте резервные копии файлов при внесении изменений.
PS PS есть удивительная вешь называется pam-mount позволяет монтировать сетевые ресурсы при авторизации клиента.