So after digging around the internet and I have found bits and pieces of information about Ubuntu Networking and Samba File Sharing, and I was able to make see other PC's on the network on my Ubuntu laptop and other PC's (like other Windows machine) was able to see my mine.
Before discussing of how I solved this issue; I would like to mention one more thing Ubuntu 14.04 is using Samba Version 4 (to be specific version 4.1.6) older version of Ubuntu were using a different version of Samba (Ubuntu 13.04 and 13.10 was using Samba Version 3, not too sure about the other releases).
So Let's get started. Firstly let's go to File Browser > Browse Network. As you can see it does not display other PC's on the network.
And also if you click on the "Windows Network" folder you will get an error message.
And also if you look on a Windows Machine, the my Ubuntu Laptop does not appear on their network either. (My Ubuntu Laptop name is Inspiron3537).
At the moment smbtree command won't work at the moment because I do not have Samba installed yet. So let's install samba. In your terminal type:
sudo apt-get install samba system-config-samba
You'll get a prompt to enter your password, so enter your password and then it will install the relevant packages for samba. It also install a GUI for managing shares in Samba. After installing Samba, I opened the GUI manager and added a user (and also the password for the user), which is myself or you can also run the following command in terminal:
sudo smbpasswd -a <user_name>
(where user_name is a name specified by you, will explain later when the user_name and password will be used)
First add your which folder you want to share.
Second click on the "Access" tab, to give the user you created the share.
Now let's have a look on the Network Browser, see if share did anything.
Nope doesn't look like anything happened. Let's have a look on a Windows Machine.
And also (finally !!!!), if we run the smbtree command, it still doesn't show anything.
But if I enter my Ubuntu Laptop IP or computer on the Windows Machine (in the form of \\Inspiron3537\ or \\192.168.1.xx\) it will show my share that I have created, so we know the file sharing is working.
And vice versa, if you have shared folders or have your Windows machine on the network, can you still view it by going to File Manager > Connect To Server.
And then enter smb://<ip_address>/<folder_name> as in your Windows machines IP or smb://<computer_name>/<folder_name> as in your Windows machines computer name and lastly <folder_name> as the specific folder you have shared, and you'll receive a prompt to enter your windows credentials and then you should be able to see the Windows share.
But the problem is, it's still not working other PC's on the network on my Ubuntu laptop and my Ubuntu laptop is not showing other machines either. So What I did next was to edit the smb.conf file (which is in the following directory /etc/samba). If you run the following command in terminal, it will open the smb.conf file in the text editor for editing:
sudo gedit /etc/samba/smb.conf
Now, in the global section, I've added two more parameters which is
preferred master = yes
domain master = yes
name resolve order = bcast wins lmhosts host
And also make sure that your workgroup equals to whichever workgroup all the other PCs (in my case the other Windows Machine) are on same work group. By default it should be on "WORKGROUP".
Second look for a parameter called "obey pam restrictions", this parameter will be a "yes," you will have to change it to a "no"
Save the changes and restart your samba service, you can run the following commands:
sudo restart smbd && sudo restart nmbd
Once this is done, let's run smbtree command.
Success !! I can see my Ubuntu shares and also I can see my Windows machine on the network. Now let's go to the Network Browser to see if it is working there now too (Please note, you have to restart your PC for the Network Browser to work).
If you double click on the "Windows Network" folder, you shouldn't get any errors, and see a folder called "WORKGROUP".
And also if you click on the "WORKGROUP" folder, you can see what's Windows PCs are on the network.
Also a success !! Now let's see if my Ubuntu laptop appears on my Windows PC.
You should able to see your Ubuntu shares on the Windows PC.
Thanks for reading !!!
This is my first time go to see at here and i am genuinely pleassant to read everthing at one place.
ReplyDeleteThe Kids Website Design for Pediatric Doctors.