Is there no SMB/CIFS client component in Windows?

1

I know that Windows acts as an SMB/CIFS server by default. So one can easily access Windows files from another machine in the network with a proper SMB client. But what if I want to do the opposite and access the SMB server on that other machine with the Windows machine?

In other words, is it true that Windows only has the SMB server component, and not the client component?

I am using Windows Vista SP2. The way I have tried accessing the SMB server from Windows is by going to Computer, and then Network. I can see all the devices in the network, even my TV shows up, but not the Linux-based STB that hosts the SMB server. Is this normal behavior in Windows?

However, I am able to access the STB simply by using my Android phone in combination with the ASTRO file manager and the SMB module for it. I am even able to connect it to the Windows machine this way, not just the Linux-based STB. I can even copy files from my Linux-based STB to my Windows-based PC, all from a handheld Android device. But I have no luck accessing anything from the Windows machine... what gives?

The way I figure is that Windows simply lacks the SMB/CIFS client component. Am I right? And if so, where do I obtain a SMB client that runs on Windows? The most clients I've seen on Google are for Linux.

Samir

Posted 2012-09-24T16:01:45.737

Reputation: 17 919

Yes it has a client. It is called the Workstation service. – Zoredache – 2012-09-24T16:34:43.797

I go to services.msc and the service named Workstation is up and running. Are you saying that this is a requirement for SMB to work? Because this is a service, it's not like it has a graphical user interface. – Samir – 2012-09-24T18:02:39.213

Yes it is required. Try stopping it, and you won't be able to connect to anything. – Zoredache – 2012-09-24T18:11:23.003

Answers

3

No, it is not true. Windows uses SMB as its primary file sharing protocol, and includes SMB/CIFS client capabilities in almost all Windows versions since Windows for Workgroups 3.1. (Microsoft also distributed stand-alone clients for earlier versions of Windows and even MS-DOS, named "Microsoft Network Client" or "Microsoft LAN Manager" depending on versions.)

The reason your PC's browser doesn't see the shares on the STB may be an issue to do with workgroup names: when using the old "NetBIOS" network browsing protocol, Windows only displays hosts within the same workgroup, although other hosts can still be accessed by name. (Note that network browsing is not part of SMB, and is not required for SMB to work.)

Try accessing the SMB server directly by its name. Open a command-prompt window and try a command like:

  • net view \\servername to view visible shares;

  • dir \\servername\sharename to list a share's contents;

  • net use s: \\servername\sharename to map a share to a drive letter.

Also try changing servername to the STB's IPv4 address.

RedGrittyBrick

Posted 2012-09-24T16:01:45.737

Reputation: 70 632

You were right! When I do net view I can see all my Windows computers on the LAN. But the Linux STB is not shown! I can then do net view dm500hd or net view \\dm500hd or net view 192.168.0.107 to view the shares on the STB. But dir \\dm500hd is not a valid input (syntax, file, folder or volume). It has to be dir \\dm500hd\name_of_share. So you need to know the share name before you do that command. – Samir – 2012-09-24T17:33:09.533

I have never used net command to map a share to a drive letter before. I'm sure this will come in handy at some point. And yes it works, and it was wise of you to set the letter to S because I have like crazy number of disk partitions up to drive letter L. Mapping it to a letter certainly simplifies things. But I still wonder why browsing the network doesn't work. Is this normal? My workgroup is just WORKGROUP. And why is Windows asking for username and password when connecting to the Linux box over SMB? – Samir – 2012-09-24T17:38:44.717

Is there no dedicated client program for SMB/CIFS? The commenter above mentions the Workstation service. But this is merely a service that the net command and such depend on, it is not a program with a user interface. – Samir – 2012-09-24T18:04:18.727

1@Sammy: 1) You don't actually need to map it to a letter; you can always access the UNC path \\server\share directly in Explorer and all programs. 2) Maybe the STB just doesn't have the "browsing" daemon running? If the STB uses Samba, the daemon is nmbd. 3) Because the Linux box wants a username and a password, of course. 4) No, there isn't. The SMB client is implemented as a set of kernel drivers – MrxSMB, NetBT, LanmanWorkstation, possibly others. There also are built-in WebDAV, NFS, NetWare clients; net use relies on the kernel to pick the right one. – user1686 – 2012-09-24T19:09:57.267

1@Sammy: (Note that the SMB server is implemented in kernel mode as well.) – user1686 – 2012-09-24T19:18:43.133

@grawity After I run the nmbd command I can now browse it on my Windows computer. Thx! – Samir – 2012-09-30T17:07:17.330

I had the smbd daemon running but not nmbd. – Samir – 2012-09-30T17:56:24.913