Samba
Wins nss 主機名解析不起作用
我正在嘗試使 win 名稱解析正常工作。我以為我理解了所需的步驟,但我無法讓它工作。
該盒子正在執行 SLES 12 SP1。
這就是我所做的:
- 添加了一個wins伺服器到
/etc/samba/smb.conf
:[global] wins server = 10.3.4.60
- 啟用並開始
winbind.service
:# systemctl status winbind.service winbind.service - Samba Winbind Daemon Loaded: loaded (/usr/lib/systemd/system/winbind.service; enabled) Active: active (running) since Tue 2016-05-31 13:25:35 SAST; 1h 27min ago Main PID: 32111 (winbindd) Status: "winbindd: ready to serve connections..." CGroup: /system.slice/winbind.service ├─32111 /usr/sbin/winbindd -D └─32112 /usr/sbin/winbindd -D May 31 13:25:35 vt53ipam01 systemd[1]: Starting Samba Winbind Daemon... May 31 13:25:35 vt53ipam01 systemd[1]: winbind.service: Supervising process 32111 which is not our child. We'll most likely not notice when it exits. May 31 13:25:35 vt53ipam01 winbindd[32111]: [2016/05/31 13:25:35.636807, 0] ../source3/winbindd/winbindd_cache.c:3235(initialize_winbindd_cache) May 31 13:25:35 vt53ipam01 winbindd[32111]: initialize_winbindd_cache: clearing cache and re-creating with version number 2 May 31 13:25:35 vt53ipam01 winbindd[32111]: [2016/05/31 13:25:35.637881, 0] ../lib/util/become_daemon.c:124(daemon_ready) May 31 13:25:35 vt53ipam01 winbindd[32111]: STATUS=daemon 'winbindd' finished starting up and ready to serve connections May 31 13:25:35 vt53ipam01 systemd[1]: Started Samba Winbind Daemon.
- 將服務添加
wins
到 nsswitchhosts
數據庫:# grep hosts /etc/nsswitch.conf hosts: files dns wins
如果我呼叫
getent
並指定wins
服務,它會起作用:# getent -s wins hosts VT53TESTSQL01 10.6.27.20 VT53TESTSQL01
但是使用預設服務集呼叫
getent
不起作用:# getent hosts VT53TESTSQL01 <nothing returned>
我不知道我錯過了什麼。關於如何使它工作的任何提示?
您是否嘗試過重新啟動?
在每個使用 nsswitch.conf 的程序中,整個文件只讀一次。如果稍後更改文件,該過程將繼續使用舊配置。