The following guide will show you how to install Samba Server in order to share files between your Windows and Ubuntu computers.
To install, open 'terminal' and enter the following command:
sudo apt-get install samba smbfs
Once this process completes you will have Samba installed. Next you need to configuire it to make it accessible.Run the following command to open the configuration file
sudo gedit /etc/samba/smb.conf
Find the following section:
####### Authentication #######
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user
Remove the ';' from the 'security = user' line and add the following below it:# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user
security = user
username map = /etc/samba/smbusers
This will make Samba use the smbusers file to look up the user listusername map = /etc/samba/smbusers
Create a Samba User
- Run the smbpasswd utility to create a password for your samba user:sudo smbpasswd -a <username>
- Add that user to the smbusers file:sudo gedit /etc/samba/smbusers
- Add the following line to connect the username with the user you want to give access to<username> = “<username>”
If you have any issues or easier methods to achieve this, leave us a comment below.