LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Detecting Linux or Unix over a network (https://www.linuxquestions.org/questions/programming-9/detecting-linux-or-unix-over-a-network-574913/)

wlburns 08-05-2007 04:45 PM

Detecting Linux or Unix over a network
 
I have programmed for over 20 years, but always in Windows. Recently our company has been adding some Linux, Macintosh, and other Unix type PCs to the network. I have a scanner that I use to inventory and track all the PCs on the network. It can of course detect and report the different Windows versions across the network. But I need a way to tell if the remote PC is a PC running a non-Windows OS. I can't just assume if it is not windows, then it is a non-windows PC, because we have hundreds of other network type devices too. (printers, routers, switches, pbxs, etc) So right now, it is not tracking any of the Linux or Macintosh PCs that I know are there.

Does Linux/Macintosh/Unix have any unique open TCP/IP ports that I can use to detect it across a network that are specific to Unix? Or maybe a unique sharename, or...? Or a way to query a response from them that they would respond to?

I would like to be able to tell between Linux, Macintosh, Unix, Sun, etc. But even if I can just tell if it is a Unix based OS, that would help. If not, how can I tell it is a PC and not something like a printer, etc.

Note: This would not be across the internet, I only need to test the devices on my own LAN/WAN.

Any ideas?

-William.

General Failure 08-05-2007 05:00 PM

On my box,
Code:

nmap -sT -O -PT 127.0.0.1
shows (among other stuff)
Code:

TCP/IP fingerprint:
SInfo(V=4.11%P=i486-slackware-linux-gnu%D=8/5%Tm=46B64788%O=631%C=1)

So it should be possible I guess, but I'm no TCP/IP guru and I assume this might catch other Linux operated devices as well. My Fritzbox doesn't seem to respond though ;)

wlburns 08-05-2007 06:13 PM

nmap does appear to show the OS of most remote PCs which is encouraging. But I forgot to mention the scanner is running from a Windows server.(which will not have nmap) It needs to be able to detect Linux/Unix across the network. Wouldn't happen to know what TCP/IP or Netbios query or packet the nmap command is using, would you?

-William

indienick 08-05-2007 11:35 PM

What level of control do you have over these PCs? My suggestion (to make things easier) would be to have any (and all) Linux/UNIX boxes install Samba, and configure it so the PC name contains a significant letter of some sort; say the last letter of the PC name being an "L" for Linux, "U" for UNIX, "M" for Mac.

wlburns 08-06-2007 08:47 PM

I am in a position that I can suggest a naming standard for them. However with 60,000+ PCs, and they are scattered all over the US, it is nearly impossible to get everyone to conform to standards. So it would be nice to be able to find them regardless of what our remote field tech did.

I know that they will not have Microsoft file sharing or be able to remote connect on the registry like Windows does. So I can tell they are non-Windows from that. But how can I tell if they are a PC at all and not one of the 1000s of other network type devices like printers, routers, etc.

I have been playing with Slackware on one of my PCs at home for several months and love it so far. But the most I have done across the network with it is use Firefox to browse the internet. What kind of things can be done to remote Linux PCs across the network? For example do they have something like windows admin shares that I can test for? Or remote desktop? (something that will be on them by default so that I dont have to rely on them loading a client)

indienick 08-06-2007 09:53 PM

Ahhhhhh - what can't Linux do across a network!

If you set up something like XDMCP you can log in (graphically) across a network.

SSH (Secure SHell) - text-based administration, and is frighteningly useful. I use this almost exclusively for administrative work on any network I monitor. This is the "de facto" of network-based administration in the UNIX world.

There are graphical remote desktop applications, but I believe they're usually tied into the desktop environment. I'm 99% certain KDE has a remote desktop sharing application of some sort.


All times are GMT -5. The time now is 05:59 PM.