I had some problems with connecting my Windows 10 computer to my Ubuntu 16.04.1's samba server. Finally I got it.
So how to share files on the Ubuntu 16 server with Windows 10 computers?
sambaserversmbwindows
I had some problems with connecting my Windows 10 computer to my Ubuntu 16.04.1's samba server. Finally I got it.
So how to share files on the Ubuntu 16 server with Windows 10 computers?
Best Answer
First, if you made any changes to an existing samba configuration, revert them, or delete the
/etc/samba/smb.con
and uninstall samba.I assume your Ubuntu server username is
peterlustig
and the Ubuntu server IP is192.168.2.42
.sudo apt-get install samba
sudo cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak
Just backup your configsudo mkdir /myshares
- what you want to share via Sambasudo chown peterlustig:peterlustig /myshares
sudo chmod 777 /myshares
or experiment with lower rights, I havn't done that yetsudo smbpasswd -a peterlustig
Adds the user peterlustig to the Samba database and activates it. (Usually different password than peterlustig in Ubuntu itself. The password is what you need to enter later when connecting with the Windows 10 client to the server, step 10)sudo nano /etc/samba/smb.conf
And add the following to the bottom of the file:sudo /etc/init.d/samba restart
restart your server and reload the configufw
Firewall, you need to configure it. E.g. I allow only 192.xxx.xxx.xxx hosts to access my Samba shares, so I entered:sudo ufw allow from 192.0.0.0/8 to any app Samba
\\192.168.2.42
. Now you should see your shared folder namedmy-shared-folder-name
from step 8 in the[]
brackets. Open it. Now you need to enter your credentials, i.e. usernamepeterlustig
and the password you entered in step 6.You can even map it as Windows network drive. Address will be
\\192.168.2.42\my-shared-folder-name
, and don't forget to enable using different credentials (than your Windows 10 user provides) and enterpeterlustig
and password from step 6 there.Hope this helped anyone. Happy sharing!