LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2006, 01:20 AM   #1
HTS
LQ Newbie
 
Registered: Apr 2004
Location: Middle East
Distribution: RH9
Posts: 23

Rep: Reputation: 15
getting hostname of linux pc in win application


I am running a windows application that uses gethostbyaddr(),
when I try to get the hostname of linux pc I fail.

I need to know how can I set the linux pc that it will be seen in the windows network not only by its IP address.

Is it something with SMB configuration?

I can ping to this PC with no problems

Thanks
 
Old 11-15-2006, 03:14 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Is this a static or dynamic network?

If static, then the trouble must lie in the server configuration.
If dynamic, then it may be in the dhclient.conf file - does the server assign a hostname or does it expect the client to supply one? I suspect the latter - in which case you need to tell your client to do this in it's dhclient.conf file.
 
Old 11-15-2006, 06:38 AM   #3
HTS
LQ Newbie
 
Registered: Apr 2004
Location: Middle East
Distribution: RH9
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for the answer.

The network is static. I assign the IP manually.
I am talking on a small network, no server, just one windows PC and 2 LINUX PCs.

Maybe I need to add something to smb.conf?
 
Old 11-15-2006, 09:47 AM   #4
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
in smb.conf file under
[global]
netbios name = whatever u want


restart samba
 
  


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
vsftpd not list files when viewed from deifferent win machine win ftp application in anuj_sharma25 Linux - Newbie 2 11-22-2005 11:08 PM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM
My instructions are for Linux, but I work in Win...what is the win equialent of (~)? michaelton Linux - Newbie 2 05-21-2004 11:15 AM
linux hostname Red Squirrel Linux - Networking 11 02-18-2004 06:58 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration