Setup a NAS on your home server! How to create a samba server in Ubuntu 22.04
Published on:
Views: 0
Likes: 0
Tags:
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/ sudo nano /etc/samba/smb.conf paste at the bottom: https://github.com/jhodak/linux-configuration-files/blob/main/Samba/samba.txt 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 \\[ip.of.server]\sambashare 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: //[ip.of.server]/sambashare /mnt/sambashare/ cifs cred=/home/[username]/.smb,vers=3.0,noperm 0 0 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!