1 修改 /etc/X11/xdm/Xaccess

去掉下面的注釋

 

  1. #*                                       #any host can get a login window  

2 修改啟動模式/etc/inittab

 

  1. id:5:initdefault:  
3修改/etc/gdm/custom.conf

 

 

  1. # GDM configuration storage  
  2.   
  3. [daemon]  
  4.   
  5. [security]  
  6. AllowRemoteRoot=true  
  7. DisallowTCP=false  
  8. [xdmcp]  
  9. Enable=true  
  10. Port=177  
  11. [greeter]  
  12.   
  13. [chooser]  
  14.   
  15. [debug]  

4修改/etc/X11/xdm/xdm-config用 ! 注釋下面的語句

 

  1. !DisplayManager.requestPort:    0  
5 修改以下文件權限,確保有444權限

 

 

  1. # ll /etc/X11/xdm/Xservers  
  2. -rw-r--r--. 1 root root 485 Jan  6 22:35 /etc/X11/xdm/Xservers  
  3. # ll /etc/X11/xdm/Xsetup_0  
  4. -rwxr-xr-x. 1 root root 938 Aug 20  2010 /etc/X11/xdm/Xsetup_0  

7 修改/etc/securetty

 

  1. tty1  
  2. tty2  
  3. tty3  
  4. tty4  
  5. tty5  
  6. tty6  
  7. tty7  
  8. tty8  
  9. tty9  
  10. tty10  
  11. tty11  
  12. rsh  
  13. rexec  
  14. rlogin  
添加
  1. pts/0  
  2. pts/1  
  3. pts/2  
  4. pts/3  
  5. pts/4  
8 修改/etc/pam.d/login

 

 

  1. #%PAM-1.0  
注釋掉
  1. #auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so  
  1. auth       include      system-auth  
  2. account    required     pam_nologin.so  
  3. account    include      system-auth  
  4. password   include      system-auth  
  5. # pam_selinux.so close should be the first session rule  
  6. session    required     pam_selinux.so close  
  7. session    required     pam_loginuid.so  
  8. session    optional     pam_console.so  
  9. # pam_selinux.so open should only be followed by sessions to be executed in the user context  
  10. session    required     pam_selinux.so open  
  11. session    required     pam_namespace.so  
  12. session    optional     pam_keyinit.so force revoke  
  13. session    include      system-auth  
  14. -session   optional     pam_ck_connector.so  
9 修改 /etc/pam.d/remote
  1. #%PAM-1.0  
注釋掉
  1. #auth       required     pam_securetty.so  
  1. auth       include      password-auth  
  2. account    required     pam_nologin.so  
  3. account    include      password-auth  
  4. password   include      password-auth  
  5. # pam_selinux.so close should be the first session rule  
  6. session    required     pam_selinux.so close  
  7. session    required     pam_loginuid.so  
  8. # pam_selinux.so open should only be followed by sessions to be executed in the user context  
  9. session    required     pam_selinux.so open  
  10. session    required     pam_namespace.so  
  11. session    optional     pam_keyinit.so force revoke  
  12. session    include      password-auth  
9關閉防火墻,或開放UDP 177端口

可以使用system-config-firewall操作防火墻

可以使用/etc/init.d/iptables stop關閉防火墻

10重啟機器

 

以上操作,順序及原因不詳,望指點,很多操作都是照葫蘆畫瓢,不講原因,弄對了就OK,下次還是不明白。

參考:

http://lmdkfs.blog.163.com/blog/static/7461132420124445749639/

http://wenku.baidu.com/view/ac4a2f1aa8114431b90dd842.html

http://blog.sina.com.cn/s/blog_7065a1e40100mahz.html

http://hi.baidu.com/edeed/item/7e511dd9d1e4003e48e1dd8a