xmanager 遠程桌面管理 linux
以RHEL 4為例:使用 vi 編輯器編輯以下配置文件:
以下配置都用root用戶
1、修改 /etc/X11/xdm/Xaccess 文件,修改內容
# * #any host can get a login window
去掉 # 號,變為
* #any host can get a login window
保存,退出
2、修改 /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
將最后一句 Enable=false
改為 Enable=true
在同一配置文件中找到語句
# The port. 177 is the standard port so better keep it that way
#Port=177
去掉端口前面的 # 號,改為
Port=177
(177端口是要配置的 xdmcp 服務監聽端口)
保存,退出。
3、修改 /etc/inittab文件,修改內容
id:3:initdefault:
改為
id:5:initdefault:
同時修改下列語句
# Run xdm in runlevel 5
x:5:respawn:/etc/X11/prefdm -nodaemon
為:
# Run xdm in runlevel 5
x:5:respawn:/usr/bin/gdm
保存,退出
4、修改 /etc/X11/xdm/xdm-config 文件:
DisplayManager.requestPort: 0
為:
!DisplayManager.requestPort: 0
保存,退出
5、修改配置文件 /etc/X11/xdm/Xservers 權限為 444
修改配置文件 /etc/X11/xdm/Xserup_0 權限為 755
chmod 444 /etc/X11/xdm/Xservers
chmod 755 /etc/X11/xdm/Xsetup_0
查看修改后的配置文件權限:ls -l
-r--r--r-- 1 root root 487 2005-05-14 Xservers
-rwxr-xr-x 1 root root 935 2004-10-21 Xsetup_0
6、配置linux防火墻端口
iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT
完成
(有時候會出現防火墻端口沒有開啟,在終端運行 setup 配置防火墻端口:選擇防火墻,在其他端口填寫 177:udp ,保存退出)
7、重新啟動
init 6
(over 收工)
posted on 2007-11-08 22:08 prince 閱讀(648) 評論(1) 編輯 收藏 所屬分類: 硬件網絡