Skip to content

On a Linux Client computer, in a Terminal window, SSH into the headless enosServer.
$ ssh pshare@enosServer
$ su
# pacman -Syu samba

A smb.conf file is not supplied as part of the samba package.
EndeavourOS includes a /etc/samba/smb.conf file during the script installation.
ll /etc/samba
-rw-r– – r– – 1 root root 8105 Mar 27 03:55 smb.conf

look for a smb.conf file. Check the permissions and ownership compared to above.
If so, all our necessary config files are in place.
# vi /etc/samba/smb.conf
Find the following lines

#=================== Global Settings======================

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
   workgroup = WORKGROUP

Change workgroup = WORKGROUP to workgroup = YOURWORKGROUPNAME

Still in “Global Settings” find the following line
hosts allow = 127. 192.168.0.
if necessary, adjust 192.168.0. to the first three triads of your router’s address.

Find the following lines at the very end of the the file

comment = Samba Share
path = /server
valid users = pshare
public = no
writeable = yes
printable = no
create mask = 0765

If desired, change the share name [ENOSshare] to something else.
The share name ENOSshare is case sensitive.
Change valid users = pshare to your username if you chose to change it.
Possibly change the path name of the server’s data partition in the path = section.
Don’t change anything else except the lines mentioned above.
Close the editor. After editing, test the changes that were made.
# testparm
Should not be any errors. If errors occur check the smb.conf file for typos or other mistakes.

Set a samba password to access this share from a Windows machine.
# smbpasswd -a pshare
New SMB password: EnterAPassword
Retype new SMB password: Re-enter the same password
password can be whatever you want and does not need to be an existing password.

It is assumed the ufw firewall was installed with the headless server.
Next we set up the Server’s firewall for samba. Adjust the IP address as necessary.
# ufw allow from to any port 445
# ufw allow from to any port 137
# ufw allow from to any port 138
# ufw allow from to any port 139
# ufw status
Status: active
To Action From
-- ------ ----

Now we need systemd to start up the services at boot up.
# systemctl enable smb.service
# systemctl enable nmb.service
# systemctl start smb.service
# systemctl start nmb.service

The headless server is now ready to serve a Windows client.
Restart the enosServer computer.
#systemctl reboot

Connect with us:

Homeserver 4 – Install and setup a SAMBA server

  • by
%d bloggers like this: