Second Day Notes: Sharing a folder from Linux to Windows 10


Here are some notes about my experience sharing files from Linux so that my Windows 10 computer could access them. I’m going to try to make this useful but not give excessive details. It’s already going to be long!

The technology I used to share the files is called Samba. It uses the SMB networking protocol. According to wikipedia.org, the Samba name was chosen because it has the letters ‘S’, ‘M’ and ‘B’ in the same order as SMB.

These comments are about “second day” issues. I shared successfully on the “first day” by following tutorials. However, I forgot what was important. I couldn’t access the Linux computer when I turned the computers back on the next morning.

I’m using Ubuntu 18.10 and Windows 10. Other flavors of Linux may use different commands, but the principles should be the same. Other flavors of Windows might work in the Windows 10 manner, but I didn’t try.

  • On the Windows side, I want to connect to the Linux computer’s name, not its IP address.

    \\192.168.1.5\Documents bad.
    \\Sesqui412\Documents good.

    The IP address changes easily. The tutorials use an IP address, but that’s not the second day solution.

    I can also use net use L: \\Sesqui412\Documents to access the files as L:.

  • I don’t need the ‘samba‘ service running on Linux. I want the ‘smbd‘ service. This was a big rabbit hole. Once I gave up on the “samba” service and started using the “smbd” service, it worked correctly on the Linux side. I didn’t see any message online “Hey! you don’t want the samba service, you want smbd.” That would have been appreciated.

    This whole effort may have been completely unnecessary. if I had started with the smbd service instead of the samba service, I might have seen that everything was already correct from yesterday.

    This was a big battle. I was looking for information about starting samba. When I installed Samba
    sudo apt-get install samba
    I would get an error message
    "Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service".

    However, I didn’t notice the message right away. Reinstalling Samba with
    sudo apt-get install samba --reinstall
    let me eventually see the error. Trying to fix the message led me to a lot of grief and DuckDuckGo searches.

    There is a lot of information on serverfault.com and askubuntu.com about Samba problems. I found the basic commands to use are
    sudo systemctl enable smbd
    sudo systemctl start smbd
    To check for error messages, use sudo systemctl status smbd. Some references also suggest starting nmbd. I didn’t verify that nmbd is necessary but I used it.

    Again, to emphasize, this whole section is probably unnecessary. It was certainly “educational.”

  • I didn’t need to manipulate file permissions on the Linux computer. I didn’t manipulate any file permissions and they weren’t necessary to make the share work. Some online helps make chmod suggestions about that but I could safely ignore them.
     
  • Yesterday, I set up the configuration file /etc/samba/smb.conf. It was pretty straightforward. Network Administration: Samba smb.conf file describes options in the file. There’s also help at How to set up quick and easy file sharing with Samba.

    Some tutorials explain that when you change smb.conf, you need to run
    sudo systemctl restart smbd
    to activate the changes

  • If you find a tutorial site that gives a long story without explaining their purpose, try to understand the situation, not throw attempts on the wall and hoping they stick. (Disclaimer: This post isn’t meant as a tutorial, but rather some observations. For example, I don’t say anything about how I did the “first day”.)

    Two help sites that I feel are worth avoiding are http://social.microsoft.com/forums and http://ubuntuforums.org. If I see a link to either of them in a search result, I should keep looking somewhere else. Other resources are likely to have more “signal” and less “noise.”

    The three http://serverdefault.com, http://askubuntu.com and http://superuser.com are communities that are more likely to have reliable information.

  • The passwords for Samba use the program smbpasswd on the Linux computer. I had trouble with the passwords. This was the command to fix it. I’m not sure exactly what I did. I might have just used the wrong password.

So, on the first day, I got it working. On the second day, it broke. It was a lot of work fixing it. I hope these notes help someone else know some of the principles so that they can have a happier second day than I did!

Curiosity Smashes Hate

Just as Trust can cover Fear, in the spiritual game of rock paper scissors, Curiosity smashes Hate.

I was thinking about the cliche of love being the opposite of hate, and that seems silly. Why is there the expression of a love-hate relationship if they can destroy each other?A boy looking at a rock through a magnifying glass

If you hate someone, you want them to be out of your life. You don’t want to think about them, you don’t want to know how they’re feeling. It doesn’t bother you in the least that they had a bad day at work or a good game of golf.

If you are curious about someone, you want to know more. You may disagree, like I disagree with my friends that are pro 2nd amendment. But, if I’m curious I can ask to understand what that actually means to them. I can find the reason that it’s important. I can’t hate them for anything if I’m willing to ask them what the 2nd amendment means to them on a personal level.

Another way Curiosity smashes Hate is that it is respectful which builds trust. The triad that starts with Trust and Curiosity support each other.

Someone you hate, you’re likely to fear. Someone you are curious about, you can accept when they’re honest and it becomes a trust building exercise. With that trust, building curiosity is more successful.

Curiosity is different than inquisitiveness. Inquisitive wants to figure something out. It is limited and only has certain goals. Inquisitiveness can be mocking or insincere. If you’re curious, you truly want to learn something about the person.

I talked to a friend last night and learned a lot of interesting things. She shared with me some stuff and as our trust built, I shared some stuff that she was curious about and I was fearful of sharing with anyone for it being misused. But, as our trust built, the curiosity was rewarded and we talked about things I’d never shared before.

Hate is destructive and black. Curiosity is like shining a flashlight in cave: there’s always more to see. There’s always the next surprise to find. Children are curious, children don’t hate until they are corrupted by others.

Curiosity can become a game and lead to all sorts of joy… a sort of communion between two people so that they can see each other’s humanity and be refreshed by the life spirit within each of them.

Original image: rock hound. By woodleywonderworks [Image license]