Add Samba
This commit is contained in:
@@ -50,11 +50,11 @@ The exact steps depend on the backup mode.
|
|||||||
1. Point the browser to *http://127.0.0.1:8000* (replace *127.0.0.1* with the actual IP address of the Raspberry Pi).
|
1. Point the browser to *http://127.0.0.1:8000* (replace *127.0.0.1* with the actual IP address of the Raspberry Pi).
|
||||||
2. Start the desired action by pressing the appropriate button.
|
2. Start the desired action by pressing the appropriate button.
|
||||||
|
|
||||||
The access the contents of the storage device, plug it into the Raspberry Pi and press the **DLNA SERVER** button. You can then use a uPnP application on any device on the same network to browse and view the contents of the storage device.
|
The access the contents of the storage device, plug it into the Raspberry Pi and press the **DLNA & SAMBA** button. You can then use a uPnP or Samba client on any device on the same network to browse and view the contents of the storage device.
|
||||||
|
|
||||||
<img src="img/rc.png" alt="" />
|
<img src="img/rc.png" alt="" />
|
||||||
|
|
||||||
Activating the DLNA server also returns the disk space usage information. You can use this information to monitor the remaining free space on the storage device.
|
Activating the DLNA and Samba servers also returns the disk space usage information. You can use this information to monitor the remaining free space on the storage device.
|
||||||
|
|
||||||
The **System info** link gives you access to basic system information, such as a list of storage devices and memory usage.
|
The **System info** link gives you access to basic system information, such as a list of storage devices and memory usage.
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ echo "-----------------------------------"
|
|||||||
echo "Installing the required packages..."
|
echo "Installing the required packages..."
|
||||||
echo "-----------------------------------"
|
echo "-----------------------------------"
|
||||||
|
|
||||||
sudo apt install acl git-core screen rsync exfat-fuse exfat-utils ntfs-3g gphoto2 libimage-exiftool-perl dialog php minidlna -y
|
sudo apt install acl git-core screen rsync exfat-fuse exfat-utils ntfs-3g gphoto2 libimage-exiftool-perl dialog php minidlna samba samba-common-bin -y
|
||||||
|
|
||||||
USER="$1"
|
USER="$1"
|
||||||
|
|
||||||
@@ -91,6 +91,41 @@ case $CHOICE in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
echo "--------------------"
|
||||||
|
echo "Configuring Samba..."
|
||||||
|
echo "--------------------"
|
||||||
|
pw="raspberry"
|
||||||
|
(echo $pw; echo $pw ) | sudo smbpasswd -s -a pi
|
||||||
|
sudo sh -c "echo '### Global Settings ###' > /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo '[global]' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'workgroup = WORKGROUP' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'wide links = yes' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'unix extensions = no' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'dns proxy = no' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo '### Debugging/Accounting ###' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'log file = /var/log/samba/log.%m' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'max log size = 1000' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'syslog = 0' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'panic action = /usr/share/samba/panic-action %d' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo '### Authentication ###' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'security = user' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'map to guest = Bad User' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'guest account = pi' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo '### Share Definitions ###' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo '[little-backup-box]' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'comment = Little Backup Box /media/storage' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'path = /media/storage' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'browseable = yes' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'force user = pi' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'force group = pi' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'admin users = pi' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'writeable = yes' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'read only = no' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'guest ok = yes' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'create mask = 0777' >> /etc/samba/smb.conf"
|
||||||
|
sudo sh -c "echo 'directory mask = 0777' >> /etc/samba/smb.conf"
|
||||||
|
sudo samba restart
|
||||||
|
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
echo "All done! The system will reboot in 1 minute."
|
echo "All done! The system will reboot in 1 minute."
|
||||||
echo "---------------------------------------------"
|
echo "---------------------------------------------"
|
||||||
|
|||||||
@@ -41,10 +41,10 @@
|
|||||||
<button name="camerabackup">Camera backup</button>
|
<button name="camerabackup">Camera backup</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<p>Activate the DLNA server</p>
|
<p>Activate the DLNA and Samba servers</p>
|
||||||
<p>
|
<p>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<button name="minidlna">DLNA server</button>
|
<button name="minidlna">DLNA & SAMBA</button>
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<p class="left">Shut down the Little Backup Box</p>
|
<p class="left">Shut down the Little Backup Box</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user