LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-06-2009, 11:42 AM   #1
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Rep: Reputation: 16
Getting local web server on windows domain


We have a windows exchange server setup where multiple windows pc's are connected to it's domain. The exchange server has the domain of "company.local" and any windows machine connected to this domain has something like "computername.company.local".

We have a few other platforms on our network (Mac/Linux) and their DNS server is set to this windows server so these local domain names are reachable. So I can ping "computername.company.local" from my unix box, mac, or windows box.

The linux box we have on our network serves as a local web development server. Currently I have to use it's local ip address to access it, which changes from time to time because it's on a DCHP server. I tried changing the hostname to "dev.company.local", but that doesn't seem to make it reachable by the other machines on the network.

I heard that I need something called samba, but I am unfamiliar to how this works. I don't really need/want windows file sharing, I just need to be able to access it from any machine with "dev.company.local" rather than the IP address. Thus, it needs to join the windows domain, which I am unsure how to do this.

Does anyone know how I would accomplish this?
 
Old 08-06-2009, 11:56 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello,

If you have a Windows domain set up, do you also have your DNS server setup locally? If so, then just adding a A record for the linux machine, in combination with a DHCP reservation will do the trick without installing anything. That is if you're only looking to access the machine using computername instead of IP. With DHCP reservation I mean that you make a permanent reservation in your DHCP server for the linux server. After that enter a DNS entry for the linux server stating its name and IP. If your not sure how to make a DHCP reservation then of course you can opt to change your linux NIC setting from DHCP to STATIC.

In doing this your linux machine will be 'reachable' using the servername in the domain. No need for Samba, smbclient or anything.

Kind regards,

Eric
 
Old 08-06-2009, 01:06 PM   #3
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
Without statically assigning an IP with an A record, how would I go about getting it on the windows domain? Is samba the only option? If so, how would I go about setting that up? I need for it to automatically connect to it on boot and have the host name reflect what the domain on the server is.
 
Old 08-06-2009, 01:26 PM   #4
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi,

If you don't want to set up DHCP nor DNS and want to join the Linux box to a Windows domain, then you'll need at the least Samba and Winbind. There are various how-to guides on the internet, some listed below.

Thread about it here on LQ
Step by step guide
Samba and ADS integration for user authentication
And the most important reference: Samba itself

If you set it up using common available knowledge, reading and learning, then you'll better get what it can do for you.

For your requirement I'd check out this Guide. It has a lot of practical examples from which you can get what you need.

Kind regards,

Eric
 
Old 08-06-2009, 01:47 PM   #5
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
Thanks. I saw a lot of guides on samba, but it's hard for me to determine which ones are relevant to what I need to do. Thanks for the links .

What is the difference between "Samba" and "Winbind"?
 
Old 08-06-2009, 02:03 PM   #6
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hello lukesc,

You're welcome. There is no difference between Samba and Winbind since they are not really separate programs to install. Winbind comes as a part of the Samba suite.

From Samba website
Quote:
winbind is a component of the Samba suite of programs that solves the unified logon problem. Winbind uses a UNIX implementation of Microsoft RPC calls, Pluggable Authentication Modules (PAMs), and the name service switch (NSS) to allow Windows NT domain users to appear and operate as UNIX users on a UNIX machine. This chapter describes the Winbind system, the functionality it provides, how it is configured, and how it works internally.
As stated in my previous post, if you want to join the Linux box to the AD domain, then you'll need Samba. If it's only to access the webserver on the linux box using a domain name instead of IP, using DHCP or not, then you don't need Samba and just can configure DNS and DHCP on your Windows domain controller, that is if you have access to it. Your choice depends on what you need. Samba can be simple but can do very complex things too, so really, depends on what you want it to do.

Kind regards,

Eric
 
Old 08-06-2009, 02:31 PM   #7
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
I've installed samba using "yum install samba". I edited the default smb.conf and set the following:

Code:
workgroup = company.local
netbios name = dev

security = domain
passdb backend = tdbsam
password server = company.local
I then tried "net join company.local" and I get "Unable to find a suitable server" twice.

I'm largely confused in how to correct this. I am not all that familiar with how a windows domain works. I generally work with linux web servers and stay as far away from windows as possible, so generally my experience in samba is nill.

I also don't really have access to the windows exchange server. All I really have is a user and password to join the network from a window box. I could request access, and/or get a user for the linux box (if required), but my goal is just to get it to connect to the windows domain controller so the domain controllers DNS will automatically feed 'dev.company.local' into the other machines on the network. (If what I do can be limited just to the linux box, I would prefer that, rather than tinkering with the windows server).
 
Old 08-06-2009, 02:44 PM   #8
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Code:
workgroup = company.local
netbios name = dev

security = domain
passdb backend = tdbsam
password server = company.local
The password server should show the Domain Controller servername, for example, DC1, resulting in FQDN DC1.company.local

Also for clarification read this chapter Domain membership.

If you're connecting to an ADS (Active Directory Windows 2003) domain you might prefer the security = ADS option and using as stated in above chapter
Code:
net ads join -UAdministrator%password
Kind regards,

Eric
 
Old 08-06-2009, 02:49 PM   #9
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Quote:
Originally Posted by lukesc View Post
I am not all that familiar with how a windows domain works. I generally work with linux web servers and stay as far away from windows as possible, so generally my experience in samba is nill.
Good for you if you can stay away from Windows!! But in order to understand the beast you once in a while have to enter the stable.

I'm currently in the process of trying to migrate as many Windows servers (total of 62) as possible to Linux and believe me, I'll be a happy man when the task is finished.

Kind regards,

Eric
 
Old 08-06-2009, 03:00 PM   #10
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
Ok so assuming that the server name is "server1" it's pingable hostname is "server1.company.local". Do I set "password server" to "server1.company.local"? Also in the configuration comments it says something about needing realm for ads. Do I supply this, and if so, what do I put in it?
 
Old 08-06-2009, 03:12 PM   #11
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
If your domain controller is server1 then set
Code:
password server = server1
If you set security to ADS and your domain uses Kerberos authentication protocol then the realm should list your kerberos realm. Since you don't have access to the Active Directory, that's something you'll have to ask your sysadmin for.

Kind regards,

Eric
 
Old 08-06-2009, 04:03 PM   #12
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
Well I pretty much figure out what my real problem is. I needed some kind of name to connect to for the web server, and the host name was not pingable... The DNS is set to the exchange server on our machines.

I'm assuming that the DNS on the exchange server is set to the main router. BUT my computer and the web server is behind a second router, so the DNS on the primary router doesn't see the web servers host name. As soon as I added the router I'm behind as a DNS server, I'm able to ping the hostname of the web server. So we need to fix our network issues, and then I can just ping "dev.local" which is shorter anyway .
 
Old 08-06-2009, 04:07 PM   #13
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
That is indeed a shorter way! And judging from your last post, you don't need to install anything on your webserver.

Hope it works out and you can get the network issues solved, shouldn't take much time, at least less then installing and configuring Samba to join your Windows domain.

Kind regards,

Eric
 
Old 08-06-2009, 05:04 PM   #14
lukesc
Member
 
Registered: Oct 2007
Posts: 31

Original Poster
Rep: Reputation: 16
I fixed the issue by turning the wireless router into an access point. I've found that our primary router also has it's DCHP turned off, and DCHP is being served by the exchange server itself.

Now dev.local, my web servers host name, is pingable, and all our computers are on the correct 10.1.10.* range (whereas before those behind the wireless router, including my web server, were on 192.168.10.*).

The problem I'm having now is that connection to a page through http://dev.local/ is extremely slow. It takes almost a minute just to load all the images on the page. This did not happen when I added the wireless router to the DNS list on my machine. If I access it directly through the ip address, it works normally.

Is there still something screwy with the setup, or is the DCHP server on the exchange server really slow? I'm not even really sure WHY it's serving the DCHP when the primary router could have easily done this.

I'd rather leave things the way they are now, but I can't have pages being served this slow through dev.local.

Perhaps I should start a thread in the networking forum?
 
  


Reply

Tags
domain, linux, windows


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
domain name for my local HTTP server with dynamic IP? jem81 Linux - Networking 3 08-15-2008 10:02 PM
local groups - windows domain authentication N_A_J_M Linux - Server 3 07-30-2007 04:31 PM
Cant make web server run my local web page... Nik0s Linux - Newbie 22 10-08-2006 10:30 PM
Apache is redirecting web traffic to local domain drkstr Slackware 6 06-05-2006 09:16 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM


All times are GMT -5. The time now is 03:12 PM.

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