页次: 1
看了一遍http://0pointer.de/lennart/projects/nss-myhostname/#documentation,还是有部分内容没能很好的理解:
It is recommended to put myhostname last in the nsswitch.conf line to make sure that this mapping is only used as fallback
上面这句话是什么意思,nsswithch.conf line是什么意思?
另外,127.0.0.1和127.0.0.2有什么区别?
nss-myhostname官方文档:
http://0pointer.de/lennart/projects/nss … umentation
离线
# /etc/nsswitch.conf
passwd: compat
group: compat
shadow: compat
hosts: files dns myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
就是像黑体标出的一样,把myhostname写在那一行的最后一个,保证files、dns比它优先。
离线
离线
页次: 1