This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
ntlm_авторизация_в_microsoft_ad [2009/04/20 13:05] val |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== NTLM авторизация в Microsoft AD ====== | ||
| - | |||
| - | ===== Настройка службы winbindd ===== | ||
| - | |||
| - | <code> | ||
| - | gX# cat smb.conf | ||
| - | </code><code> | ||
| - | [global] | ||
| - | workgroup = ADX | ||
| - | security = DOMAIN | ||
| - | winbind use default domain = Yes | ||
| - | |||
| - | idmap uid = 20000-40000 | ||
| - | idmap gid = 20000-40000 | ||
| - | template homedir = /home/%U | ||
| - | template shell = /bin/sh | ||
| - | winbind enum users = yes | ||
| - | winbind enum groups = yes | ||
| - | winbind cache time = 36 | ||
| - | </code> | ||
| - | |||
| - | ===== Запуск службы winbindd ===== | ||
| - | |||
| - | ==== FreeBSD ==== | ||
| - | <code> | ||
| - | [gX:~] # /usr/local/etc/rc.d/samba start | ||
| - | </code> | ||
| - | |||
| - | ==== Ubuntu ==== | ||
| - | <code> | ||
| - | root@gX:~# /etc/init.d/bind9 restart | ||
| - | root@gX:~# /etc/init.d/winbind restart | ||
| - | </code> | ||
| - | |||
| - | ==== Проверки ==== | ||
| - | <code> | ||
| - | gX# ntlm_auth --username=uX | ||
| - | password: | ||
| - | NT_STATUS_OK: Success (0x0) | ||
| - | |||
| - | gX# wbinfo -u | ||
| - | ... | ||
| - | |||
| - | gX# wbinfo -g | ||
| - | ... | ||
| - | </code> | ||
| - | |||
| - | ===== Настройка библиотеки nsswitch на использование winbind ===== | ||
| - | <code> | ||
| - | gX# cat /etc/nsswitch.conf | ||
| - | … | ||
| - | group: files winbind | ||
| - | passwd: files winbind | ||
| - | shadow: files winbind # for linux only | ||
| - | … | ||
| - | |||
| - | gX# wbinfo -n uX | ||
| - | gX# wbinfo -S … | ||
| - | |||
| - | gX# id uX | ||
| - | |||
| - | gX# chown -R uX:'domain users' /home/uX | ||
| - | </code> | ||
| - | |||
| - | ===== Настройка библиотеки pam на использование winbind ===== | ||
| - | |||
| - | ==== FreeBSD ==== | ||
| - | <code> | ||
| - | [gX:~] # cat /etc/pam.d/sshd | ||
| - | ... | ||
| - | auth sufficient /usr/local/lib/pam_winbind.so | ||
| - | auth required pam_unix.so no_warn try_first_pass | ||
| - | </code> | ||
| - | |||
| - | ==== Ubuntu ==== | ||
| - | root@g15:~# apt-get install libpam-modules | ||
| - | |||
| - | <code> | ||
| - | root@gX:~# more /etc/pam.d/sshd | ||
| - | ... | ||
| - | auth sufficient pam_winbind.so | ||
| - | # Standard Un*x authentication. | ||
| - | ... | ||
| - | </code> | ||