LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 08-17-2009, 02:17 PM   #1
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Debian Lenny AMD64
Posts: 506

Rep: Reputation: 32
Hostname and domain name. How do I set them?


I will try to put things in order.

#1 I am receiving (from cron.daily) e-mails about rkhunter, etc. How do I stop receiving these messages?

#2 From those mails, I realized my hostname (and/or domain) were not set up correctly. This is because those mails are giving me the message "Unknown host".

If I use the following commands I get these results:

# uname -n
Result: debian5b (this is the hostname I want).

# hostname -a; hostname -s; hostname -d; hostname -f
With any of these I get: Unknown host

# hostname --fqdn
Result: Unknown host

If I edit /etc/hostname, it contains: debian5b

# syctl kernel.hostname
Result: debian5b

I I edit /etc/hosts, I get:

Quote:
127.0.0.1 localhost
127.0.1.1 debian5b.u\020\326\265~\024u\020\017u3\345;f\003\2523AI\327
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
What can I delete/modify from /etc/hosts? Are those ip6 lines needed?

My /etc/resolv.conf looks like:

Quote:
domain u\020\326\265~\024u\020\017u3\345;f\003\2523AI\327
search u\020\326\265~\024u\020\017u3\345;f\003\2523AI\327
nameserver 200.49.130.26
nameserver 200.49.130.27
nameserver 200.49.130.33
This is my desktop computer (Debian Lenny). IP address: 192.168.1.136

So What should I do to set my hostname and domain correctly? What is missing?

I will really appreciate your help. Thanks in advance,

Glore2002.-

Last edited by glore2002; 08-17-2009 at 02:44 PM.
 
Old 08-17-2009, 02:43 PM   #2
DebianDwarf
LQ Newbie
 
Registered: Jul 2009
Location: NL
Posts: 8

Rep: Reputation: 0
If you look at "cat /etc/hostname" you can see if anything has been set. Use "hostname insert-name".

"man hostname: Hostname is used to either set or display the current host or domain name of the system"

The FQDN part can be set in /etc/hosts, like:
127.0.0.1 localhost
127.0.1.1 moonbase.mothership.local moonbase

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Dunno about rkhunter yet, don't use it...
 
Old 08-17-2009, 07:02 PM   #3
glore2002
Member
 
Registered: Mar 2007
Location: Buenos Aires, Argentina.
Distribution: Debian Lenny AMD64
Posts: 506

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by DebianDwarf View Post
If you look at "cat /etc/hostname" you can see if anything has been set. Use "hostname insert-name".

"man hostname: Hostname is used to either set or display the current host or domain name of the system"

The FQDN part can be set in /etc/hosts, like:
127.0.0.1 localhost
127.0.1.1 moonbase.mothership.local moonbase

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Dunno about rkhunter yet, don't use it...
Thanks for your help. I still couldn't change the domain name. For instance, I would like to have debian5b as the hostname and inicioms as the domain. What should I do?

Glore2002.-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
specify hostname with domain jdnow09 Red Hat 2 06-15-2009 11:47 PM
Hostname in domain jhwilliams Linux - Software 4 07-12-2007 01:18 PM
Apache domain and hostname bcom Linux - Software 0 05-27-2004 02:35 PM
Want to set up a new domain name and hostname? hamster Linux - Networking 6 04-06-2003 12:04 PM
hostname vs domain racediver007 Linux - Newbie 5 03-20-2003 03:30 PM


All times are GMT -5. The time now is 07:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration