Browse an SMB / CIFS network without Samba

Hello friends!. As we recommend in our previous article, we must go from the simple to the complex. Therefore, we continue the series by learning to Navigate and Use the resources that we find in an SMB / CIFS network.

The images shown correspond to a Debian Wheezy workstation with the GNOME-Shell. I think that everything that we will explain next is also valid for Ubuntu.

Debian installs the library by default libsmbclient, a package that allows our team's applications to converse with Samba and Microsoft Windows servers.

Which indicates that DO NOT Samba must be installed to access SMB / CIFS networks. This support is present in the core of our operating system. Of course its functions are basic but sufficient to navigate.

If we open the Nautilus and click on the button «Examine the network», and we have enabled in the preferences that the "Place:", we will see how it changes / home / user to the place network: ///. If we continue browsing, we will see the following:

samba-ii-01

When double clicking on the «Windows Network» icon, all the Workgroups or "Workgroup" from our LAN. In our case, only the group «DCH» is shown. Now, watch how the "Place:" de network: /// a smb: ///:

samba-ii-02

Watch the change to smb: // dch / by double clicking on the Working Group:

samba-ii-03

Finally we obtain the list of computers that may or may not have shared resources, but that support the SMB / CIFS protocol. When selecting the equipment of our interest, the List of its Shared Resources should be shown, only if the server or machine in question allows any user to obtain that list, which is the default behavior. In passing observe the change of Location: a smb: // alpha:

samba-ii-04

If the share that we want to open is protected by username and password, which is normal in business networks, and we know that we have permission to access it, after we validate ourselves correctly we can access its content.

Note that the name of the DOMAIN which in this case is the name of the Working Group is in capital letters.

samba-ii-05

After we successfully authenticate, the Location: change to smb: // alpha / des /, and also an icon will appear on the desktop -in case we have activated the desktop- with the name of «des in alpha«, Which acts as a« Link »to our remote resource.

Also in the Nautilus the resource will be reflected in its Sidebar of Places «Des in alpha»In the« Network »area.

samba-ii-06

samba-ii-07

If we need to open a certain file -via network- with the local application -installed on our computer- associated with that type of file, we will see how some DO open successfully, while others DO NOT. It will depend, among other factors, on the support our application has for the SMB / CIFS protocol.

If we can't open the file remotely and we don't want to install any more packages for mount the shared resource locally, and we need to open it as read-only or modify it - according to the permissions we have - what we can do is copy it to our computer and work the file locally.

If we want to close the connection established with the Remote Resource, we can do so in Nautilus itself by clicking the right mouse button on the corresponding icon and selecting the option "Disassemble".

A faster way to access resources whose location we know in advance would be to execute -through Alt + F2 or by console- the following command:

nautilus smb: // server / resource

Examples:

nautilus smb: // mixp / music
nautilus smb: //mixp.amigos.cu/musica
nautilus smb: //192.168.10.100/musica
nautilus smb: // federico @ mixp / music

Try and you will see that, if authentication is required to access the resource, when the user is indicated, the authentication dialog varies a bit.

In case it is an Independent Server (Standalone) not registered in a Domain, the user must exist on the Server and must have permissions to read and / or modify the resource. The name of the DOMAIN it will be the server itself Standalone.

In GNOME and KDE at least, there is also the "Connect to Server" alternative. KDE's Dolphin file browser makes it easy for us with its "Network" icon, just like Nautilus.

On the other hand, if we need professional access to a business LAN and we do not want to join the domain to our workstation, so as not to need to authenticate each time we want to access a certain resource, we can install the package smb4k in any desktop environment even if it originates from KDE.

This package installs among other dependencies: samba-common-bin, smbclient y smbfs, at least in Squeeze. It has an extremely intuitive interface and my judgment is professional.

What has been explained so far may seem very elementary. In fact, most of the process that occurs on the servers and that allows us to navigate through an SMB / CIFS network, is completely transparent for the user. In spite of everything we want to point out the following aspects:

  • To access the resources of a network with a Domain, either Windows or Samba, DO NOT It is mandatory to have our client computer registered in the Domain, although if we do so it would be more comfortable to navigate the LAN since we only authenticate ourselves once.
  • Each computer connected to a LAN must share the same network or «network»And the same network mask. If the network is 192.168.10.0 and the mask is 255.255.255.0 (192.168.10.0/24), it indicates a Class "C" network in which we can have up to 254 computers. A network of this class meets by far the needs of the vast majority of small and medium-sized businesses. Therefore, each computer connected to the network must have an IP address 192.168.10.xxx/255.255.255.0, so that it can be stated that they participate in the same network.
  • If the service is not running on the network DNS, there cannot be a correct name resolution from the IP addresses of the computers, unless we distribute a file for each of them hosts whose content will be that of all the names of the teams and their respective IP addresses. See / Etc / hosts o man hosts. The file hosts it is nothing more than the Static Table of Search of Host Names from their IP Addresses.
  • Although to close a connection we choose the option «Dismount» in Nautilus or in the Link created on the Desktop, "Resources are not actually mounted on our local file system". The Link redirects our request to a Special place (see the GNOME 2.xxxx help) which is a URL of the type smb: // remote-computer / share-resource.
  • The support for SMB / CIFS networks that allows us to converse with Windows and Samba servers is part of the Linux Core, DO NOT of the Samba program. Neither are packages smbfs, smbnetfs, and cifs-utils. For more information, see «Samba3-ByExample. Chapter 13 Performance, Reliability, and Availability«.
  • According to what Samba recommends, and whenever possible, a WINS server should be installed on each subnet. This service, which is also provided by Samba itself, greatly facilitates NetBIOS name resolution. WINS service is to an SMB / CIFS network what DNS is to the Internet. DO NOT you must have more than one WINS server on the same subnet.

As this post is not intended as a substitute for abundant and exuberant documentation :-), please clarify your doubts by reading it. Samba does not forgive the Impatients and befriends those who study it even basically.

And it seems to me that it is enough for today. Therefore, the Activity is over, friends!

Until the next adventure !!!.


16 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   eliotime3000 said

    Wow! This is the perfect way I was looking to connect to Windows shared folders without the hassle of SAMBA or any other type.

    Thank you, friend. This can be used even for the newest.

  2.   Rolo said

    very good art. but ... I'm not convinced that samba is in the kernel, it is more than certain that you have the smbclient client installed and that is why you can enter a samba or win network.

    1.    Federico A. Valdes Toujague said

      Nothing further from the truth. As I said in the article, the Samberos themselves claim to have nothing to do with the kernel's support for browsing SMB / CIFS networks. Even the smbclient that IS from Samba, can be installed later.

      1.    He passed through here said

        if you have nautilus, it will surely link with gvfs and that's why it installs

        aptitude show libsmbclient
        Package: libsmbclient
        State: not installed
        Multi-Arch: same
        Version: 2: 3.6.16-1
        Priority: optional
        Section: libs
        Maintainer: Debian Samba Maintainers
        Architecture: i386
        Uncompressed Size: 6164k

        you can throw an apt-cache rdepends libsmbclient and see what it goes with

        1.    Federico A. Valdes Toujague said

          aptitude show libsmbclient
          Package: libsmbclient
          New: yes
          Status: installed
          Automatically installed: yes
          Version: 2: 3.5.6 ~ dfsg-3
          Priority: optional
          Section: libs
          Developer: Debian Samba Maintainers
          Uncompressed size: 6242k
          Depends on: libc6 (> = 2.5), libcap2 (> = 2.10), libcomerr2 (> = 1.01),
          libgssapi-krb5-2 (> = 1.7 + dfsg), libk5crypto3 (> = 1.6.dfsg.2),
          libkrb5-3 (> = 1.8 + dfsg), libldap-2.4-2 (> = 2.4.7), libtalloc2 (> =
          2.0.0), libwbclient0 (> = 2: 3.4.0 ~ pre2), zlib1g (> = 1: 1.1.4)
          Description: shared library for communication with SMB / CIFS servers
          This package provides a shared library that enables client applications to talk
          to Microsoft Windows and Samba servers using the SMB / CIFS protocol.
          Homepage: http://www.samba.org

          1.    He passed through here said

            Saving the version, it's the same, the thing is for the other side, that's why I put the rdepends thing
            I put it backwards
            apt-cache depends on nautilus
            apt-cache depends on gvfs
            apt-cache depends on gvfs-backends
            apt-cache depends on libsmbclient
            and we got to the aptitude show
            it is valid that you do not install the smbclient or samba. if you use gvfs as backend

            or maybe what you put in Description with (apt-cache or aptitude) show smbclient or samba
            regarding cifs-utils

  3.   Federico A. Valdes Toujague said

    apt-cache rdepends libsmbclient
    libsmbclient
    ReverseDepends:
    xmms2-plugin-smb
    libxine1-misc-plugins
    vlc nox
    smbnetfs
    smbc
    libwbclient0
    libsmbclient-dev
    python-smbc
    mplayer
    mplayer-gui
    mencoder
    libfilesys-smbclient-perl
    kdebase-runtime
    gvfs-backends
    libgnomevfs2-extra
    fusesmb

    And in Squeeze, if you run "apt-cache depends nautilus | grep libsmbclient ', it doesn't return anything.
    Well, read well that in an article I write:

    "Debian installs the libsmbclient library by default, a package that allows our team's applications to converse with Samba servers and Microsoft Windows."

    Notice that I say "Applications." A clean install with GNOME or KDE installs it

  4.   truko22 said

    Interesting, I understood that this was done by samba-client 😀

  5.   Rolo said

    i just installed a debian wheezy cd1 and samba client shows up as virtually installed
    v samba-client

    I see that the libsmbclient package is installed by default therefore the title is wrong
    look at the content of cd 1
    http://cdimage.debian.org/debian-cd/current/i386/list-cd/debian-7.1.0-i386-CD-1.list.gz

    1.    Federico Antonio Valdes Toujague said

      The title is correct, @rolo, as the Samba Suite is NOT installed. The package samba It is NOT installed. On the other hand, you should review the concept of what a Virtual Package is. Thanks for comment!!!.

      1.    Julius Cesar Dominguez said

        regards

        !!! What good knowledge of samba ..?; I do not understand anything; at times it works very well for me and 40% the connection drops, it doesn't matter to me; anyway I am glad to know that there are people who know a lot in the matter.
        congrats

  6.   Kevin said

    Simply amazing, perfect series of articles to get started in SAMBA, great !!!
    Reading it patiently and with pleasure!

    1.    federico said

      Thanks for comment !!!. The purpose is that: to give an entry point to the Samba theme

  7.   DaniFP said

    Great this and the rest of the articles on Samba! The truth is, I hate using SMB / CIFS, but when I am forced to, articles like this relieve a lot of headaches. Thank you!

    1.    federico said

      Thank you for your comment and I am pleased to have helped you.

  8.   Miguel said

    Hi, I have a doubt. Is it possible to deny access to browse the web in Nautilus to a given user in debian 8? If so, what would it be like?
    Thank you very much and congratulations on your article.