alwe
Posts: 3
Joined: Fri Feb 08, 2013 9:45 am

Set computer and domain name

Fri Feb 08, 2013 10:00 am

I recently installed Raspbian (2012-12-16-wheezy-raspbian) and need to be recognized in the company's AD to be able to get network access. Have tried to find how to set the computer name and domain name, but cant't find where (new to linux).

The computer name should be A93 and the domain Ao.local , since it already has been added in the AD.

Tried to add the hostname through sudo nano etc/hosts, but the file does not seem to exist.?

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Set computer and domain name

Fri Feb 08, 2013 11:01 am

not sure about AD
but the files should be
/etc/hosts
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: Set computer and domain name

Fri Feb 08, 2013 6:58 pm

/etc/hostname defines the system's name and /etc/resolv.conf the domain details. Both are text files that may be modified with your favourite editor.

The network environment of hosts is defined in /etc/hosts; note the leading /

You may find the means to set these from your desktop manager under Administration > Network

alwe
Posts: 3
Joined: Fri Feb 08, 2013 9:45 am

Re: Set computer and domain name

Tue Feb 12, 2013 8:53 pm

Great, thanks! Works like a charm!

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: Set computer and domain name

Tue Feb 12, 2013 9:07 pm

Nice to hear. Good luck.

User avatar
socialdefect
Posts: 110
Joined: Mon Jun 25, 2012 9:02 pm
Location: Tilburg, the Netherlands
Contact: Website

Re: Set computer and domain name

Wed Feb 13, 2013 7:49 am

If you like quick and dirty there's also this one:

Code: Select all

sudo hostname your.hostname.here
This will set a fully qualified hostname (FQDN) too, have a look:

Code: Select all

hostname -f
== If it's not broke... I'm not done fixing it! ==

Return to “Beginners”