LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   getting hostname of linux pc in win application (https://www.linuxquestions.org/questions/linux-networking-3/getting-hostname-of-linux-pc-in-win-application-501718/)

HTS 11-15-2006 01:20 AM

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

Simon Bridge 11-15-2006 03:14 AM

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.

HTS 11-15-2006 06:38 AM

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?

doublejoon 11-15-2006 09:47 AM

in smb.conf file under
[global]
netbios name = whatever u want


restart samba


All times are GMT -5. The time now is 02:51 AM.