Hi Zorin Community,
To help with the End of 10, I wanted to post this guide for those who want to migrate from Win 10 to Zorin for the use case of: I currently have Win 10 PCs and a Zorin PC and would like to network these before jumping completely off of Win 10 by year end.
I have read through posts here and in other forums online, but found some info gaps that led to confusion on my part as well as delays in getting things to work. I have included links to sites that were helpful to me.
This guide is still a work in progress and I intend to refine it. The steps work for me (even if there may be bugs in it), so I am hoping it works for others. It is for newbies as well.
In Zorin:
1. Enable a folder you want to share.
There is a folder called Public in Home (if not, create it), make it shareable:
Right click on it and select – Local Network Share
Enable: Share this folder; Allow others to create and delete files in this folder
Add a comment if you like in the comment section.
2. Work in the Terminal & Ensure you are in the root:
https://linuxconfig.org/how-to-switch-to-root-on-linux
$ sudo -i
it will ask for your password
You can make sure you are in root by:
$ whoami
it will return: root
3. Now Install Samba
Follow the steps outlined in the link to install it:
From the same link above, configure the firewall to allow samba:
$ ufw allow samba
4. Configure the smb.conf file that is created when it was installed
Use gedit to edit this file: sudo gedit /etc/samba/smb.conf
4.1. First test the smb.conf file to check for errors using the testparm command:
My Zorin PC is called zorin-desktop
root@zorin-desktop:~# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = Enter\snew\s\spassword:* %n\n Retype\snew\s\spassword:* %n\n password\supdated\ssuccessfully .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
root@zorin-desktop:~#
I did not get any errors or warnings so this must be fine.
4.2. Now editing the config file:
Under the [global] section add the following if it is not there already:
workgroup = WORKGROUP
For me it was already included. It can be changed to whatever the name of the workgroup is but in Windows Network its the WORKGROUP. So I kept it.
Then add netbios name, which will properly identify the server to other systems on the network:
netbios name = LinuxServer
I changed LinuxServer to ZORIN. Note, this name has a 15 character limit.
Now allowing the directory/folder we want to share, which is called Public in the Home folder.
Put the following under the “Share Definitions” section under the [Global].
#======================= Share Definitions =======================
.
.
[Public]
comment = Example Samba share
path = /Public
browseable = Yes
public = yes
writable = yes
valid users = zorin
create mask = 0700
directory mask = 0700
The “valid users” and “masks” were taken from:
https://askubuntu.com/questions/1360650/access-to-shared-folder-failing
The valid users will restrict access to zorin, which is the user for the ZORIN.
You can change the valid user name to anything, for example: Lucy
4.3. Testing the smb.conf file to check for errors using the testparm command:
root@zorin-desktop:~# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
netbios name = ZORIN
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = Enter\snew\s\spassword:* %n\n Retype\snew\s\spassword:* %n\n password\supdated\ssuccessfully .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb
[Public]
comment = Example Samba share
create mask = 0700
directory mask = 0700
guest ok = Yes
path = /Public
read only = No
valid users = zorin
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
root@zorin-desktop:~#
No errors or warning so it seems okay.
5. Starting the Samba and Netbios name servers
Refer to this link again under this same section:
The following is quoted from the link: For an Ubuntu server to operate within a Windows network, the Samba (SMB) and NetBIOS nameservice (NMB) services must be started. Optionally, also enable the services so that they start each time the system boots:
root@zorin-desktop:~# systemctl enable smbd nmbd
root@zorin-desktop:~# systemctl start smbd nmbd
Before attempting to connect from a Windows system, use the smbclient utility to verify that the share is configured:
root@zorin-desktop:~# smbclient -U zorin -L localhost
Password for [WORKGROUP\zorin]:
Sharename Type Comment
--------- ---- -------
Public Disk
print$ Disk Printer Drivers
IPC$ IPC IPC Service (zorin-desktop server (Samba, Ubuntu))
Brother_MFC_J5845DW Printer
SMB1 disabled -- no workgroup available
root@zorin-desktop:~#
There may be an error above, no workgroup available, but in the end I can access Public.
6. Now you can connect
Reboot both your Zorin and Win 10 PCs.
For this case I can only connect from the Win 10 PC to Zorin, not the other way. This could be due to the potential error above.
Via Windows Explorer or Total Commander (my preference for Windows file manager), enter \\ZORIN in the address bar and then it will connect to the Public folder.
Enter the password and you are in. I can now backup/transfer my Win 10 files to Zorin.