Tuesday, April 2, 2013

wrong /etc/hosts file entry + LINUX

Hey Friends,

Today, a very good learning we had. One of the user has made himself an entry in /etc/hosts file. He said I want to keep one IP but different alias name. the pattern which he followed is shown below.

[root@-1 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.XX.XX.XXX localhost oracle 188-1 xyz
[root@-1 ~]#
XX are represented in place of IP. He kept all alias name on the same line. Even I didn't realize this and thought it is looking ok. But when he was not able to login from any where. Login to Server through XMANAGER. and when trying to connect then it showed error of local host name.Like above server or system is not having LOOPBACK entry.

These two things were added in the /etc/hosts file. and the HOST enrty were  made as below:-


127.0.0.1           localhosts localhosts.domain
10.XX.X.XXX oracle
10.XX.X.XXX xxxxxx
10.XX.X.XXX xyz

and some additional packages of gnome and gdm were only upgraded. after this user was able to login through XMANAGER.

Love Sharing..
Amit Chopra

No comments: