The ITS Team will be performing maintenance on Confluence beginning at 6:00 pm Tuesday, Feb 4. During this time the service may go offline. It should be available again by 8:00 pm. Please refrain from editing pages during this time to avoid losing your work.
We are using samba and appache2 to run our data server on the labs linux machine in 44 through the uva network.
Samba Setup:
Samba allows for seamless integration of Linux, windows, and mac computers to share files between them. Since windows 10, windows no longer supports a core feature needed for samba to run, wsdd. Therefore this needs to be installed first.
The github repo used to install wsdd is found here: wsdd
For the lab computer I installed directly from github and moved wsdd.py to /bin renaming it to wsdd. From there I created a job using crontab to run wsdd on reboot.
To setup jobs on crontab: crontab -e
"@reboot python3 /bin/wsdd" can be added to the job list
Once wsdd is setup, install samba using your normal method of installing like:
sudo apt-get install samba
Once installed Samba should be running, the status can be seen here: systemctl status smbd
Stop Samba using: systemctl stop smbd
Now that samba is stopped we can edit the config files. Samba auto creates a config file that can be edited directly but I made my own on the linux machine. The configuration for smb.conf and shares.conf can be seen below.
If you decide to make your own config remember to rename the default one. I renamed the labs to smb.conf.bak
These config files allow for different groups to be added, and permissions to be set. All of this is found in /etc/samba
I then created the folders that the paths in shares.conf leads to. This is where the files will be kept!
After the folders and config files are setup, we can proceed to adding the group and user for samba. this is done with the following commands and will only need to be done once.
sudo groupadd --system smbgroup
sudo useradd --system --no-create-home --group smbgroup -s /bin/false smbuser
This can be confirmed looking into /etc/group /etc/psswd
We can then give this group and user the proper premissions:
sudo chown -R smbuser:smbgroup /path/to/serverfolder
sudo chown -R g+w /path/to/serverfolder
With that done, start samba!
systemctl start smbd
Everyone on the network can now see, if they have their settings correct per OS, the server SPIN. Inside there will be two folders data and protected.
On the linux machine this is found on /home/spin/share