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.
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
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!
I was at a doctor’s office today and found this on the wall as I was leaving:
This toggle switch lock is useful for many situations
It’s a lock to hold a light switch on (or off).
The locks are not easy to find at a good price. I found some on ebay and Amazon, but not in local hardware stores. For a small piece of plastic, they are expensive, but they are probably a low-volume item and don’t benefit from an economy of scale.
There’s a second style that has a hole for the toggle. This alternate style has the advantage that it can’t be knocked out of place. From the photographs, it appears that installations benefit from a longer-than-normal screw to hold it securely.
A church I visit has a switch they want to keep on. Right now it is just held in place with packing tape. I’ll have to see if they’d like me to donate one of these. They look much more professional and don’t need an obligatory “please leave this switch on” message taped to the wall.
The reviews report another use for them: to protect switches that are part of a smart home system such as SmartThings, Wink, Google Home or Echo and Alexa. Reviewers also suggest using them with the switches for garage lights, outdoor lights and sump pump systems.
I have a lot of clutter on my disks. I keep projects around “just in case.” One thought was “Maybe I’ll go back some day.” As I migrated from computer to computer, the files kept multiplying… one copy on the old computer and a companion on the new. As partitions got full, files moved from one to the next, making new copies to add to the clutter. The debris of unfinished projects are everywhere.
This summer I took all of my old drives that were still readable and loaded them into the main computer, allowing even more clutter to spin silently. It’s amazing how small drives were 10 – 15 years ago. I even discovered that I have files of my floppy discs from the pre-Windows computer era.
To help with the declutter project, I wrote a utility that visits all of the files on the computer and records their name, size and where they’re located. I used the logs from that tool to find all of my “NewPoetry” folders. (NewPoetry holds copies of my poetry since 2010 and I really only want the most recent edit.) Now I only have one NewPoetry!
I am searching for an old project takes my poetry and formats them as a website. I haven’t used that tool for several years. I hope that the HTML formatted files can be a companion to http://blog.wwayneb.com blog where I published many of my poems
Last week I found that I had a mouse. I put out a trap for him. He ate the peanut butter, didn’t trip the trap and left a lot of “souvenirs.” I put up a couple new traps under my sink. I put honey on one of them.
I was watching a movie when I hear some squeals from my kitchen. I looked under there and found the mouse trapped with it’s back broken by the spring trap.
It took me a minute to come to terms with him still being alive. I felt he was frightened and looking at me.
Finally, I told myself that I’d already committed to killing it, so this was just part of the process. After a couple of minutes, I did dispose of the mouse, but I was very hesitant to do that.
If I was working in a slaughterhouse, I would have this internal conversation over and over. Not a good career choice.
This was a pleasant weekend. I got a bunch of things done and felt pretty comfortable.
I worked on some Perl scripts that allow data entry and calculations with my budget information. I could have done it with an Excel spreadsheet, but developing code was more enticing.
I also have been upgrading my laptop. I installed Windows 10 on it. The system is unacceptably sluggish but I can’t justify upgrading to a new laptop. Right now it is synchronizing my 200k+ files in dropbox. That is taking a long time. I’ll have to see how the laptop behaves once dropbox is settled.
I installed Scrivener, Cygwin and ActiveState Perl. Also Office 365 and I built the 4.07.0 OCaml system. The laptop I’m keeping slightly more “stock” by not installing utilities like Avast and possibly also not other browsers like Chrome and Firefox.
I’ve built a couple websites recently. One, http://alphaomegaonline.org has morphing colors. It’s not interactive although clicking flips between different algorithms for the color transformations. I’m designing an update that reacts to mouse clicks by “fracturing” the screen into sub-screens that morph independently.
The other site http://sesquibits.com/planets.html calculates and displays a running summary of the distance between the planets. It also shows relative velocities and acceleration. You can pick any planet as the center point. A future goal for the site is to present interactive graphs of the planetary distances.
Other pleasant escapades in the weekend were visiting friends, going to the Y and reading a couple of books. I ate way too much pizza.
Today I got the 4th email asking me to send a payment to prevent videos of “me having fun” from being released to my friends and coworkers.
Three of the threats had a “from” at outlook.com and one was from a .ru return address. The outlook.com messages appear to have been generated by (automatically?) filling in a lengthy template. The text in the .ru threat was completely different.
The threats are based on my same user name, password and email address. The message subjects are the same. All of them demand that I should pay the money via bitcoin. They all claim to have videos that record me using a pornography service. They give me 48 hours to reply. They all use warped syntax and look like they were created by a non-English speaker.
One message was from July when I first heard of the porn video scam. I received three threats this month.
The user name/password were only used on a livejournal account. It’s a demonstration why using different passwords on different sites is important. If I had had repeated passwords, I wouldn’t know where the theft happened.
It also shows that once information is stolen, it can pop up repeatedly. I assume that I’ll be getting more of these messages.
I think the worst-case outcome of the election in November is to have recounts in many separate federal contests.
That would be substantially more divisive and destructive than having a lot of offices change party.