& Nbsp; the difference between redhatrhel5 and rhel4 is that there is no/etc/X11/TPD/directory in rhel5, put the configuration file of rhel5 in/usr/share/TPD/defaults. conf. You need to modify the following information: fortpd: & nbsp; Open/etc/TPD/gdm M. confandsettheE redhat.
The difference between rhel5 and rhel4 is that there is no/etc/X11/mcm/directory in rhel5, and the configuration file of rhel5 is put here/usr/share/TPD/ULTS ults. conf.
You need to modify the parameters as follows:
For TPD:
Open/etc/TPD/custom. conf and set the Enable entry to 1 in the [xdmcp] section as following.
[Xdmcp]
Enable = 1
Modify the/usr/share/TPD/defaults. conf file to ensure that the file contains the following lines:
Enable = true
DisplaysPerHost = 10
Port = 177
Modify the/etc/inittab file, change the default level to 5, and add the following lines:
X: 5: respawn:/usr/sbin/TPD
After this modification, the root user cannot log on, and the/usr/share/TPD/defaults. conf file must be modified as follows (in red ):
[Security]
# 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
# 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
If the firewall is enabled, run the following command to open port 177:
Iptables-a input-p udp -- dport 177-j ACCEPT
Restart, reboot
Suse
SUSE 10 and XManager system configuration
Clarify two concepts before introducing how to perform the operation.
One is the desktop integration environment, such as kde, gnome, and xface. The other is the display manager, such as kdm, gmtr, and xdm.
The following is a brief description of the desktop integration environment, which is actually the integration of a bunch of X applications.
DM is the entrance to this desktop environment, which can be used for user authentication and selection of related environments.
For example, you can use kdm to select a Chinese environment as the root user and enter the gnome desktop environment. of course, you can also enter the kde environment.
Back to this topic: if you want the operating system to support xdmcp, you can enable the xdmcp support for the DM corresponding to the system.
This is basically the process.
1: Determine your own DM type
2: Open the xmdcp support for the corresponding DM
3: open UDP port 177 If firewall is enabled
4: restart DM to make the change take effect.
5: connection X-query 192.168.59 under level 3 .*
SUSE 10 and XManager system configuration
Server: SUSE
Terminal: Xmanager 3.0
Operations on the server:
1. open the file/etc/X11/xdm/Xaccess, find the following line in the file, and delete the "#" at the beginning of the line.
# * # Any host can get a login window
After deletion:
* # Any host can get a login window
Save and exit.
Next, open the file/etc/X11/xdm-config, find the following line, and add "! ", As follows:
DisplayManager. requestPort: 0
Changed:
! DisplayManager. requestPort: 0
Save and exit.
II,
The following sections describe SuSE and RedHat respectively.
SuSE10:
Edit/etc/sysconfig/displaymanager (/etc/init. d/xdm to determine and execute corresponding DM)
DISPLAYMANAGER = "tpd" // condition 2: kdm
DISPLAYMANAGER_REMOTE_ACCESS = "yes"
DISPLAYMANAGER_ROOT_LOGIN_REMOTE = "yes"
TPD:
Edit/etc/opt/gnome/TPD. conf
[Xdmcp]
Enable = 1 // or Enable = true
Make sure that the following information exists (this row removes the comment ):
Port = 177
Kdm:
/Etc/opt/kde3/share/config/kdm/kdmrc
[Xdmcp]
# Whether KDM shoshould listen to XDMCP requests. Default is true.
Enable = true // or Enable = 1
Restart DM: rcxdm restart)
Run the X-query 127.0.0.1 test.
RHEL5:
/Etc/sysconfig/desktop (/etc/X11/preofdm judge and enable corresponding DM)
DISPLAYMANAGER = GNOME (KDE)
TPD:
/Etc/TPD/custom. conf
[Xdmcp]
Enable = 1 // or Enable = true
Kdm:
/Usr/share/config/kdm/kdmrc
[Xdmcp]
# Whether KDM shoshould listen to XDMCP requests. Default is true.
# Enable = false // (defalut)
Enable = 1
III. firewall settings
The default SuSE firewall is used to disable all external connections. If you want to open a port, you have to modify the firewall settings to open the port. The following describes how to modify the SuSE firewall settings to open a specified port. Manually modify: # vi/etc/sysconfig/SuSEfirewall2 # TCP port: FW_SERVICES_EXT_TCP = "6000" # UDP port: FW_SERVICES_EXT_UDP = "177" The firewall settings take effect: # rcSuSEfirewall2 restart
Add firewall rules: iptable-a input-p udp-s 0/0-d 0/0 -- dport 177-j ACCEPT
4. add a new user to change the password
Suse is really strange. there is no root directory for adding users. I have written a post before. to add user test1, create the directory test1 in the home directory first, however, I found another problem. users created in this way cannot log on to xwindows.
You can add the command useradd as long as you add a parameter-m.
$ Useradd-m test1-s/bin/bash
$ Passwd test1
Terminal Operations:
When the terminal is connected, you can use Xbrowser to directly enter an IP address for connection. select XDMCP.
Prohibit an ip address from accessing the host
During the test, too many databases are often connected by developers, resulting in full connection to the server, affecting normal testing. They cannot be bound by the Mail notification method, so they are prohibited from connecting to the database using this method.
Requirements: The operating system of the database server is linux, and both oracle and db2 can be used. The operating system starts to use the firewall, and opens the relevant remote login, database service port by default
Usage: The IP address that fengip wants to disable connection
After the number of connections is modified, run the following command:
IP address to be resolved by jieip
More fengip
If ["$ {1}" = ""]; then
Echo "********************************"
Echo "* IP address shocould not be null *"
Echo "* for example :*"
Echo "*./fengip. sh restart 10.130.101 *"
Echo "********************************"
Exit
Else
NUM = 'iptables-L | grep $1 | wc-L'
If [! "$ {NUM}" = "0"]; then
Echo "**************************************"
Echo "* This IP address is already blocked *"
Echo "**************************************"
Exit
Else
Iptables-a input-s $1-j REJECT
Echo kill $1 successful!
Fi
Fi
More jieip
If ["$ {1}" = ""]; then
Echo "********************************"
Echo "* IP address shocould not be null *"
Echo "* for example :*"
Echo "*./jieip. sh restart 10.130.101 *"
Echo "********************************"
Exit
Else
NUM = 'iptables-L -- line-numbers | grep $1 | awk {print $1 }'
If ["$ {NUM}" = ""]; then
Echo "************************************** **"
Echo "* This IP address is not blocked yet! *"
Echo "* It can not be open! *"
Echo "************************************** **"
Exit
Else
Iptables-d input $ NUM
Echo jieip successful!
Fi
Fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service