第一步
我们在Linux系统下,修改/etc/X11/xdm/Xaccess文件,找到下面的语句:
# * #any host can get a login window
去掉最前面的#号,成为
* #any host can get a login window
第二步
我们修改/etc/X11/gdm/gdm.conf文件,找到下面的语句:
# Allow root to login. It makes sense to turn this off for kiosk use, when
# you want to minimize the possibility of break in.
AllowRoot=true
# Allow login as root via XDMCP. This value will be overridden and set to
# false if the /etc/default/login file exists and contains
# "CONSOLE=/dev/login", and set to true if the /etc/default/login file exists
# and contains any other value or no value for CONSOLE.
AllowRemoteRoot=true
如果防火墙打开了,使用以下命令打开177端口:
iptables -A INPUT -p udp --dport 177 -j ACCEPT 使用xmanager远程连接centos5
此系统下设置相对简单:
1.首先编辑GDM配置文件
vi /etc/gdm/custom.conf
在相关属性里面添加相应的值
[security]
AllowRemoteRoot=true
[xdmcp]
Port=177
Enable=1
重启GDM /usr/sbin/gdm-restart
2.开放防火墙
如果是没有设置防火墙,跳过即可。
方法1(适用于终端):在/etc/sysconfig/iptables文件中加入:
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 177 -j ACCEPT
方法2(适用于GDM):在"系统"->"管理"->"安全级别和防火墙"中"防火墙选项"下的“其它端口"中添加UDP 177端口。
两种方法做的是同一件事,任选其一即可。