修改/etc/X11/xdm/Xaccess文件,找到下面语句:# * # any host can get a login windows,去掉前面#号;
#/etc/X11/xdm/Xaccess
#* # any host can get a login window
改为:
* any host can get a login window
修改/etc/X11/gdm/gdm.conf文件
[xdmcp]
# Distributions: Ship with this off. It is never a safe thing to leave
# out on the net. Setting up /etc/hosts.allow and /etc/hosts.deny to only
# allow local access is another alternative but not the safest.
# Firewalling port 177 is the safest if you wish to have xdmcp on.
# Read the manual for more notes on the security of XDMCP.
Enable=false
…………………………………………………………………..
#Port=177
将其中Enable=false改为Enable=true或者Enable=1
将#Port=177前面的#删除
Enable=false
#Port=177
修改/etc/inittab文件
Id:3:initdefault: 改为 id:5:initdefault:
X:5:respawn:/etc/X11/prefdm –nodeamon改为x:5:respawn:/usr/bin/gdm
修改/etc/X11/xdm/xdm-config的最后一行,在displayManager.requestPort:0前面加上一个!号
DisplayManager.requestPort:0改为! DisplayManager.requestPort:0
确保/etc/X11/xdm/Xservers的属性为444,/etc/X11/xdm/Xsetup_0的属性为755;默认如此。
Linux机器配置有防火墙,为防止防火墙将通过177端口(即xdmcp服务)的数据过虑,必须加上:
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT