Setup a NAS on your home server! How to create a samba server in Ubuntu 22.04

preview_player
Показать описание
Setting up a sambashare is probably one of the first and easiest things you can do in a homelab. Give yourself a permanent backup, store your plex movies, record videos for youtube, anything you want to store and share across devices can go on a samba share. It is easily used in windows/mac/linux!

Server:
sudo apt update
sudo apt install samba
sudo mkdir /home/[username]/sambashare/

paste at the bottom:

sudo service smbd restart
sudo ufw allow samba
sudo ufw reload

create username and password
sudo smbpasswd -a [username]

In windows to connect:
map network drive
check connect using different credentials -- input the username and password you just created

In linux edit fstab:
sudo nano /etc/fstab

in fstab at the bottom put in:

sudo apt-get install cifs-utils

sudo nano ~/.smb

inside .smb file:
user=[username]
pass=[password]

check if it mounts properly
sudo mount -a

You should now have your sambashare from a different server mounted as a drive in your /mnt/ directory.

Enjoy!
Рекомендации по теме
Комментарии
Автор

Thanks for making this video and explaining everything so simply. This has been confusing me for the longest time and you showed how simple it is.

toddselby
Автор

thank you VERY MUICH now ima buil a nas on rpi 4 for home lab and maybe keeping some files on it

Nazwatonazwa
Автор

I tried a lot and followed all steps, but not able to access the samba share from Windows. Been on it for more than 2days. I am not sure what is happening wrong. Any help will be appreciated.
My config:
[share]
path = /srv/samba/share
browseable = yes
read only = no
guest ok = yes

ufw status
To Action From
-- ----
22/tcp ALLOW Anywhere
Samba ALLOW Anywhere
80 ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
Samba (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)

sjljc
Автор

Hi, mine says:
" the network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share. " when i try to map the network drive

i logged in using a different account on the prompt but it doesnt do anything. Im logging in using the exact same credentials as i made my samba user and even my local user has the same name.
Do you know any tips?

Also if i use my windows pc account to log in (which it automatically puts the username for in the prompt and i cant change) it just says access denied.

KazunaiOwO
Автор

I have followed all of these steps but whenever I try to map the share I get the following error: "The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share."

jjpeters
Автор

Hi, do I have to have two different servers to create a Plex media server. For example one that stores the media and the other just hosting the plex server or can it all be done on one server? thanks in advance for your help

sayful
Автор

Samba does not exist!
why, I’ve been trying to get this to work for hours now what the hell did I do wrong

MoeOverload