User Tools

Site Tools


сервис_nis

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_nis [2017/07/24 13:09]
val [Инсталяция, инициализация БД и запуск]
сервис_nis [2022/10/01 21:15]
val [Инсталляция, инициализация БД и запуск]
Line 1: Line 1:
 ====== Сервис NIS ====== ====== Сервис NIS ======
  
-===== Настройка Unix сервера =====+  * [[https://​www.ibm.com/​support/​knowledgecenter/​en/​ssw_aix_72/​com.ibm.aix.nis/​nis_domain.htm|NIS Domain]]
  
-!!!Для ​аутентификации формат ​карт NIS в FreeBSD и Linux не совместим+===== Настройка Unix сервера =====
  
-==== Инсталяция,​ инициализация БД и запуск ====+==== Инсталляция, инициализация БД и запуск ====
  
-=== Ubuntu/Debian === +=== Debian/​Ubuntu ​=== 
-  * https://​help.ubuntu.com/​community/​SettingUpNISHowTo+  * [[https://​help.ubuntu.com/​community/​SettingUpNISHowTo|SettingUpNISHowTo]] 
 +  * [[https://​www.server-world.info/​en/​note?​os=Debian_10&​p=nis&​f=1|Debian 10 Buster Configure NIS Server]] 
 +  * [[https://​www.debian.org/​releases/​buster/​i386/​release-notes/​ch-information.ru.html#​rpcbind-defaults|Debian 10 Buster NIS server does not answer NIS client requests by default]]
   * В течении 5 минут ищет, пока, несуществующий NIS сервер   * В течении 5 минут ищет, пока, несуществующий NIS сервер
 <​code>​ <​code>​
Line 14: Line 16:
 </​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 29: Line 31:
 ... ...
 </​code><​code>​ </​code><​code>​
-ubuntu16# /bin/systemctl add-wants multi-user.target rpcbind.service+debian10/​11_ubuntu20cat /etc/default/​rpcbind 
 +</​code><​code>​ 
 +OPTIONS="​--r" 
 +</​code><​code>​ 
 +debian10_ubuntu20#​ init 6 
 + 
 +debian11# systemctl enable ypserv
  
-root@server:​~init 6+debian11systemctl start ypserv
  
 root@server:​~#​ /​usr/​lib/​yp/​ypinit -m root@server:​~#​ /​usr/​lib/​yp/​ypinit -m
Line 40: Line 48:
 ... ...
 </​code><​code>​ </​code><​code>​
-root@server:​~# service ​ypserv ​restart+debian10# service ​nis restart
 </​code>​ </​code>​
  
Line 49: Line 57:
 ... ...
 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 56: Line 64:
  
 [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 66: Line 74:
 [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 105: Line 113:
 </​code>​ </​code>​
  
 +==== Identity Management for Unix убрали из Windows 2016 ====
 +
 +  * [[https://​blogs.technet.microsoft.com/​activedirectoryua/​2016/​02/​09/​identity-management-for-unix-idmu-is-deprecated-in-windows-server/​|Clarification regarding the status of Identity Management for Unix (IDMU) & NIS Server Role in Windows Server 2016 Technical Preview and beyond]]
 +  * [[https://​access.redhat.com/​articles/​2203991|FAQ:​ The removal of Identity Management for Unix (IDMU) in Active Directory and how it affects the authentication of RHEL clients]]
 +
 +  * Active Directory Users and Computers->​View->​Advanced Features ... Attribute Editor
 ==== Настраиваем unix атрибуты пользователей ==== ==== Настраиваем unix атрибуты пользователей ====
  
-Добавляем группу "​guser1"​+  * [[Хранение учетных записей UNIX в LDAP#Пример назначения UNIX атрибутов в Microsoft AD]]
  
-Устанавливаем ее UNIX свойство +Аналогично, для user2 !!! 
 + 
 +**guser1**
 <​code>​ <​code>​
-gid: 10001+gidNumber: 10001
 </​code>​ </​code>​
- +**user1**
-Добавляем UNIX атрибуты пользователю "user1"+
 <​code>​ <​code>​
-uid: 10001  +gidNumber: 10001 
-группа по умолчаниюguser1 +loginShell/bin/bash 
-home dir: /home/user1+uidNumber: 10001 
 +unixHomeDirectory: /home/user1 
 +</​code>​ 
 +**group1** 
 +<​code>​ 
 +gidNumber: 15001 
 +memberUid: user2 
 +memberUid: ​user1
 </​code>​ </​code>​
- 
 ===== Настройка клиента ===== ===== Настройка клиента =====
  
-==== Ubuntu ====+==== Debian/Ubuntu ====
 <​code>​ <​code>​
-root@client1:​~# apt install nis+# apt install nis
 </​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>​
 +debian11# cat /​etc/​yp.conf
 +</​code><​code>​
 +...
 +domain corpX.un server server.corpX.un
 +</​code><​code>​
 +debian11# systemctl enable ypbind
 +
 +debian11# systemctl start ypbind
 +
 root@client1:​~#​ ypcat passwd root@client1:​~#​ ypcat passwd
 +</​code>​
 +
 +  * [[Использование библиотеки NSSWITCH]]
 +
 +<​code>​
 +client1:~# cat /​etc/​nsswitch.conf
 +</​code><​code>​
 +...
 +passwd: ​        ​compat
 +group: ​         compat
 +shadow: ​        ​compat
 +...
 </​code><​code>​ </​code><​code>​
 root@client1:​~#​ cat /etc/passwd root@client1:​~#​ cat /etc/passwd
Line 151: Line 193:
 ... ...
 + +
 +</​code><​code>​
 +debian11# service nscd restart
 </​code>​ </​code>​
- 
 ==== FreeBSD ==== ==== FreeBSD ====
 <​code>​ <​code>​
Line 158: Line 201:
 </​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 164: Line 207:
  
 [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
сервис_nis.txt · Last modified: 2024/02/01 14:05 by val