*******
Originally, when I wrote this, I could access the Windows 7 shared folder from Lubuntu but I still couldn't access the Linux folder from Windows. But then I figured out that there was a line missing from the smb.conf file:
name resolve order = lmhosts host wins bcast
I added in the Global section and once I restarted the smbd service, I now can access my folders from either computer.
*******
FYI:
*******
Fisrt I had to to open up the terminal by clicking on the Start button, then System Tools and then LXTerminal. Then I typed in the following to download two different packages or programs.
First Samaba. Type the following in in the terminal window and press enter.
sudo apt-get install samba
If it's alraedy installed it will tell you so. Otherwise, it will install and update if neccessary. Then you need to set a password.
Type the following, subtitute your own account user name for mine. Also it is reccomended that you use the same password for your shared folder as your main account password.
sudo smbpasswd -a terry
You will first have to type in your account password, then your new password for your shared folder then confirm it by typing it again.
Now lets create our folder to share. This will make a folder on the desktop called Share.
mkdir ~/Desktop/Share
Now you need to open a file called smb.conf to edit it. Type the following and press enter. There are different editors for different distros. This is what works on mine.
sudo nano /etc/samba/smb.conf
Find these lines and edit the following:
In the [global] section almost at the top of the page set your workgroup name.
workgroup = (your workgroup name)
While your there, make sure this line is present.
name resolve order = lmhosts host wins bcast
Scroll down and look for the line that looks something like this:
# wins support = no
Remove the pound symbol (#) and change the no to yes.
Then scroll right down to the bottom of the file and add the following lines. Remember to put in your own account name and user name. And where I have [Share] put in the actual folder name that you are using in the brackets.
[Share]
path = /home/Terry/Desktop/Share
available = yes
valid users = terry
read only = no
browsable = yes
public = yes
writable = yes
Now you have to save this. I wasn't sure how to do this at first. There is no File, Save option. But at the bottom of the editor, there is a menu with words and a arrow before it. I discovered that it represents the Ctrl key, so to save the file in this editor hold down the Ctrl key and press on o (that's the letter).
Now to restart the service. In the terminal type: sudo service smbd restart
Your IP address at this point might come in handy. In terminal just type: hostname -IP
Now you need to install cifs-utils.
sudo apt install cifs-utils
After that:
At first I could see the Linux shared folder from both my Win 7 and 10 computers but neither could access the folder.
In Lubuntu I went to the File Manager. I couldn't find any noticable network references like folders or shortcuts but I found it by clicking on Go, and then Network. When this showed my network shares, I tried accessing WHITE-PC, (family computer) asked for a password that I didn't have set up.
Next I tried my ASUS (Win10) - it couldn't make the connection.
Finally, I tried my ACER1 (Win7), It asked me to create a Keyring password. I did and then I had to confirm it. Then I got a password prompt to access the Windows 7 computer. I put in the username, workgroup (domain), and password. I also checked the option to Remember forever, because I don't want to go through this again. :-) Click on connect. It finally worked.
At first I could access the Windows 7 shared folder from Lubuntu but I still couldn't access the Linux folder from Windows. I figured at the time, good enough, because I can use that one folder to copy files back and fourth from one computer to the next on my network. Also I noticed a new shortcut on my Lubuntu desktop called downloads on acer1.
I later came across some more info when I was searching for a solution to my folder sharing issue. It suggested to change the order of the line name resolve order = lmhosts host wins bcast in the smb.conf file to something like, name resolve order = wins lmhosts host bcast. But when I went to do that, that's when I discovered that the line was missing from my file. I don't know why it wasn't there but when I did insert it, and restarted the service, everything just started working. I can now access my folders from any machine. By the way I just put in the original line, name resolve order = lmhosts host wins bcast