SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a fresh install of Slackware 12 running the 2.6.27 kernel. I am using XFCE4. I wanted to connect to a windows share with cifs but it returns:
Code:
mount error: could not find target server. TCP name <host-name>/<share-name> not found
No ip address specified and hostname not found
So then I try to see if I can ping the host name and I get:
Code:
ping: unknown host <host-name>
However, if I ping something like google.com I get a response.
I also checked my /etc/resolf.conf and it is as follows.
Code:
# Generated by dhcpcd for interface eth0
search wiu.edu
nameserver 143.43.142.11
nameserver 143.43.143.12
So there is a DNS server given to me by DHCP. Why can't I get an IP address for a local hostname on my subnet but I can from the internet? Am I missing something?
:~# whois wiu.edu
This Registry database contains ONLY .EDU domains.
The data in the EDUCAUSE Whois database is provided
by EDUCAUSE for information purposes in order to
assist in the process of obtaining information about
or related to .edu domain registration records.
The EDUCAUSE Whois database is authoritative for the
.EDU domain.
A Web interface for the .EDU EDUCAUSE Whois Server is
available at: http://whois.educause.net
By submitting a Whois query, you agree that this information
will not be used to allow, enable, or otherwise support
the transmission of unsolicited commercial advertising or
solicitations via e-mail. The use of electronic processes to
harvest information from this server is generally prohibited
except as reasonably necessary to register or modify .edu
domain names.
You may use "%" as a wildcard in your search. For further
information regarding the use of this WHOIS server, please
type: help
--------------------------
Domain Name: WIU.EDU
Registrant:
Western Illinois University
University Computer Support Services
1 University Circle
Macomb, IL 61455-1390
UNITED STATES
Administrative Contact:
Daniel A. Romano
Assistant Director
Western Illinois University
University Computer Support Services
1 University Circle
Macomb, IL 61455-1390
UNITED STATES
(309) 298-2517
d-romano@wiu.edu
Technical Contact:
Daniel A. Romano
Assistant Director
Western Illinois University
University Computer Support Services
1 University Circle
Macomb, IL 61455-1390
UNITED STATES
(309) 298-2517
d-romano@wiu.edu
Name Servers:
DNS1.WIU.EDU 143.43.142.100
DNS2.WIU.EDU 216.124.189.13
Domain record activated: 05-Jan-1995
Domain record last updated: 18-Jul-2006
Domain expires: 31-Jul-2009
Note the DNS IP for your university in the above 'whois wiu.edu'.
So then what are the nameservers listed in /etc/resolf.conf. I also checked windows clients for their listed DNS servers and they have the same IP addresses for the DNS server.
The Windows clients probably use NetBIOS/WINS for their name resolving - meaning they will ask the Windows Domain server to match IP addresses with your host names.
For the Linux clients in the LAN, you will have to run your own local DNS server, or you add the IP addresses to your /etc/hosts file.
Windows machine names are not the same as domain names. Microsoft really screwed this up with Windows NT when they chose to use the term "domain" to describe something entirely different and separate from DNS. With Windows Server 2003, they've begun to move to using DNS to resolve Windows machine (a.k.a. domain) names, which is a marked improvement. Otherwise, Windows uses SMB to resolve machine names. You'd need to connect to a WINS server or something similar in order to resolve them. Optionally, if you use BIND along with ISC dhcpd, BIND can resolve the hostnames of machines that receive a DHCP lease from that box. Both named and dhcpd must be running on the same box for this to work.
Also, dnsmasq can do the same thing since it handles both DHCP and DNS in one handy little package. This is perfectly suited for small LANs. Your other option is to run a local DNS server, set your Windows boxen to use a static IP address, and enter their names and IP addresses into your zonefile.
Because DNS-server setted up properly. But if you try connect to google.com via smb you'll get error. There are 2 independent name resolving systems DNS and Netbios
You don't want to get netbios working. Read again post 5 above.
netbios archives (search the forum) but do not study them to get netbios working -- instead, use them to know how insecure netbios A.K.A. "chatty peers" is. (that [netbios] also do make all kind of noise on your LAN) "here I am, come get me -- here I am, come get me" they "chat" constantly, over and over, repeatedly.
(then it sounds to me like you could do as per Eric's post # 4 above), add the name, alias, and IP of the Win box to the /etc/hosts file on your specified Linux box.
Next, I ping my own alias and it succeeds:
Code:
al@G33T-M2:~$ cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine. It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#
# For loopbacking.
127.0.0.1 localhost
127.0.0.1 G33T-M2.localdomain G33T-M2
# End of hosts.
al@G33T-M2:~$ ping -c 3 G33T-M2
PING G33T-M2.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.018 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.017 ms
--- G33T-M2.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 0.017/0.021/0.029/0.006 ms
al@G33T-M2:~$
Basically here is what I want to do. I want to connect to shares that my co-workers have set up and I wanted to write a script to do that. So I was going to use cifs to connect but I cannot resolve host names. The computer use dynamically assigned IP address so they change every so often.
So there is a DNS server given to me by DHCP. Why can't I get an IP address
for a local hostname on my subnet but I can from the internet? Am I missing something?
You are on a LAN at (hidden in behind of or a part of) wiu.edu -- but *you are not the or a internet IP* of wiu.edu. IOW, you are not directly visible from the internet -- you are hidden from the internet due to you are located *behind the internet gateway* at wiu.edu
The above 2 name servers likely are *internet nameservers* located out on the internet -- for genuine internet only (does not include lan where you're located at) domain name resolve.
Yep, you go out through the gateway to those internet nameservers to resolve but *nothing about your lan* is in those -- internet addr/name resolves fine it's what those are for.
I do not know everything. not sure what the search wiu.edu is in there for thought it might able but don't know for what
but someone above in this thread already tip you off (whois)
I just ran that very same whois and it returned two more nameservers that are *not* the above nameservers (but would these 2nd 2 have to do with your lan or are they also *internet only* -- I don't know on that
You've not yet completed, there's not yet resolve for dynamic lan name/IP addresses on the lan that you are on is your issue. The Win "chatty peers" broadcast noise all over your lan saying globally thereof "here I am, come get me" "here I am, come get me" thus 2 of those can share with each other as well as get/be compromised by someone with a laptop on your lan (or, substituted out for a fake?) ie you logon to what is a fake replica of your Bud -- said fake puts a rootkit onto your Linux box -- maybe certs. could stop this -- but I don't know -- maybe not.
if the above mentioned returned from whois nameservers have for your lan then if you got them into your resolv.conf below the other two nameservers already in your resolv.conf -- this might be wrong, make for slow queries -- likely a better way exists
as I said I don't know everything
I think the dnsmasq and other methods mentioned in post # 5 would need to be implemented at wherever the spot is that constitutes your DHCP server that's on your lan.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.