This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
сервис_nis [2021/01/11 16:14] val [Debian/Ubuntu] |
сервис_nis [2024/07/22 08:23] (current) val |
||
---|---|---|---|
Line 5: | Line 5: | ||
===== Настройка Unix сервера ===== | ===== Настройка Unix сервера ===== | ||
- | ==== Инсталяция, инициализация БД и запуск ==== | + | * [[Управление учетными записями в Linux#Создание тестового набора учетных записей]] |
+ | |||
+ | ==== Инсталляция, инициализация БД и запуск ==== | ||
=== Debian/Ubuntu === | === Debian/Ubuntu === | ||
Line 16: | Line 18: | ||
</code><code> | </code><code> | ||
... | ... | ||
- | Nis domain: corpX | + | Nis domain: corpX.un |
... | ... | ||
</code><code> | </code><code> | ||
root@server:~# cat /etc/defaultdomain | root@server:~# cat /etc/defaultdomain | ||
</code><code> | </code><code> | ||
- | corpX | + | corpX.un |
</code><code> | </code><code> | ||
- | root@server:~# cat /etc/default/nis | + | debian10_ubuntu20# cat /etc/default/nis |
</code><code> | </code><code> | ||
... | ... | ||
Line 31: | Line 33: | ||
... | ... | ||
</code><code> | </code><code> | ||
- | debian10# cat /etc/default/rpcbind | + | debian10/11/12_ubuntu20# cat /etc/default/rpcbind |
</code><code> | </code><code> | ||
OPTIONS="-w -r" | OPTIONS="-w -r" | ||
</code><code> | </code><code> | ||
- | root@server:~# init 6 | + | debian10_ubuntu20# init 6 |
+ | |||
+ | debian11/12# systemctl enable ypserv | ||
+ | |||
+ | debian11/12# systemctl start ypserv | ||
root@server:~# /usr/lib/yp/ypinit -m | root@server:~# /usr/lib/yp/ypinit -m | ||
Line 44: | Line 50: | ||
... | ... | ||
</code><code> | </code><code> | ||
- | root@server:~# service nis restart | + | debian10# service nis restart |
</code> | </code> | ||
Line 53: | Line 59: | ||
... | ... | ||
rpcbind_enable="YES" | rpcbind_enable="YES" | ||
- | nisdomainname="corpX" | + | nisdomainname="corpX.un" |
nis_server_enable="YES" | nis_server_enable="YES" | ||
nis_yppasswdd_enable="YES" | nis_yppasswdd_enable="YES" | ||
Line 60: | Line 66: | ||
[server:~] # /etc/rc.d/nisdomain start | [server:~] # /etc/rc.d/nisdomain start | ||
- | Setting NIS domain: corpX. | + | Setting NIS domain: corpX.un. |
- | [server:~] # mkdir /var/yp/corpX | + | [server:~] # mkdir /var/yp/corpX.un |
[server:~] # service ypserv start | [server:~] # service ypserv start | ||
Line 70: | Line 76: | ||
[server:~] # cd /var/yp | [server:~] # cd /var/yp | ||
- | [server:/var/yp] # ypinit -m corpX | + | [server:/var/yp] # ypinit -m corpX.un |
</code><code> | </code><code> | ||
- | Server Type: MASTER Domain: corpX | + | Server Type: MASTER Domain: corpX.un |
... | ... | ||
Do you want this procedure to quit on non-fatal errors? [y/n: n] | Do you want this procedure to quit on non-fatal errors? [y/n: n] | ||
... | ... | ||
- | Can we destroy the existing /var/yp/corpX and its contents? [y/n: n] y | + | Can we destroy the existing /var/yp/corpX.un and its contents? [y/n: n] y |
... | ... | ||
master server : server.corpX.un | master server : server.corpX.un | ||
Line 116: | Line 122: | ||
* Active Directory Users and Computers->View->Advanced Features ... Attribute Editor | * Active Directory Users and Computers->View->Advanced Features ... Attribute Editor | ||
==== Настраиваем unix атрибуты пользователей ==== | ==== Настраиваем unix атрибуты пользователей ==== | ||
+ | |||
+ | * [[Хранение учетных записей UNIX в LDAP#Пример назначения UNIX атрибутов в Microsoft AD]] | ||
Аналогично, для user2 !!! | Аналогично, для user2 !!! | ||
Line 143: | Line 151: | ||
</code><code> | </code><code> | ||
... | ... | ||
- | NIS domain: corpX | + | NIS domain: corpX.un |
... | ... | ||
</code><code> | </code><code> | ||
# cat /etc/defaultdomain | # cat /etc/defaultdomain | ||
</code><code> | </code><code> | ||
- | corpX | + | corpX.un |
</code><code> | </code><code> | ||
- | root@client1:~# ypcat passwd | + | debian11/12# cat /etc/yp.conf |
</code><code> | </code><code> | ||
+ | ... | ||
+ | domain corpX.un server 192.168.X.10 | ||
+ | </code><code> | ||
+ | debian11/12# systemctl enable ypbind | ||
+ | |||
+ | debian11/12# systemctl start ypbind | ||
+ | |||
+ | root@client1:~# ypcat passwd | ||
+ | </code> | ||
+ | |||
+ | * [[Использование библиотеки NSSWITCH]] | ||
+ | |||
+ | <code> | ||
client1:~# cat /etc/nsswitch.conf | client1:~# cat /etc/nsswitch.conf | ||
</code><code> | </code><code> | ||
Line 174: | Line 195: | ||
... | ... | ||
+ | + | ||
+ | </code><code> | ||
+ | debian11# service nscd restart && service nscd reload | ||
</code> | </code> | ||
- | |||
==== FreeBSD ==== | ==== FreeBSD ==== | ||
<code> | <code> | ||
Line 181: | Line 203: | ||
</code><code> | </code><code> | ||
rpcbind_enable="YES" | rpcbind_enable="YES" | ||
- | nisdomainname="corpX" | + | nisdomainname="corpX.un" |
nis_client_enable="YES" | nis_client_enable="YES" | ||
</code><code> | </code><code> | ||
Line 187: | Line 209: | ||
[client1:~] # /etc/rc.d/nisdomain start | [client1:~] # /etc/rc.d/nisdomain start | ||
- | Setting NIS domain: corpX. | + | Setting NIS domain: corpX.un. |
[client1:~] # /etc/rc.d/ypbind start | [client1:~] # /etc/rc.d/ypbind start |