LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Struggling with SMB shares (https://www.linuxquestions.org/questions/linux-networking-3/struggling-with-smb-shares-4175717375/)

haemogoblin 10-02-2022 05:06 PM

Struggling with SMB shares
 
So I've been setting up Plex on an ASUS Tinkerboard, part of the tutorial I'm following directs me through setting up network shares. The issue I'm having is when I get to setting up a permanent network share.

Tutorial is below...

sudo su
apt install cifs-utils -y
mkdir -p /mnt/shares/media
# mount a public network share...
mount.cifs //192.168.1.199/share1/ /mnt/shares/media/
# or mount a private network share with credentials
mount.cifs //192.168.1.199/share1/ /mnt/shares/media/ -o user=user1,pass=user1password
# mount a share at system boot (preferred)
echo "username=user1" >> ~/.smbcredentials
echo "password=user1password" >> ~/.smbcredentials
chmod 600 ~/.smbcredentials
echo "//192.168.1.199/share1 /mnt/shares/media cifs credentials=/root/.smbcredentials,_netdev 0 0" >> /etc/fstab
exit

Now when I use the command
mount.cifs //192.168.1.199/share1/ /mnt/shares/media/

Everything works fine, but obviously this don't last after a reboot. (please note, I've not bothered including my own shares, here, but aside from changing the names and the IP address, the path structure looks the same.)

However the instructions for a permanent share will not work. Hoping someone might be able to advise.

wpeckham 10-02-2022 09:18 PM

Quote:

However the instructions for a permanent share will not work. Hoping someone might be able to advise.
Did you, in source location for those instructions, read the part about replacing "user1" with the real users login, and "user1password" with the password for that user?

At this point you might want to share with us the contents of your /etc/fstab file so we can take a look.

You might also want to review the location and contents of that credential file.

Finally: why are you using a CIFS mount? That is the Microsoft way, and I tend to avoid using anything that Microsoft can break.

frankbell 10-02-2022 09:36 PM

Per this article, you can enable automounting of a Samba share by adding it to your /etc/fstab file.

wpeckham 10-02-2022 10:10 PM

Quote:

Originally Posted by frankbell (Post 6384000)
Per this article, you can enable automounting of a Samba share by adding it to your /etc/fstab file.

Hola Frank. If you check the original post, he has steps to add that mount to /etc/fstab. It is uncertain if these have been implemented properly, but they are in there.

remmilou 10-04-2022 06:02 AM

Blanc line
 
Quote:

Originally Posted by haemogoblin (Post 6383971)
So I've been setting up Plex on an ASUS Tinkerboard, part of the tutorial I'm following directs me through setting up network shares. The issue I'm having is when I get to setting up a permanent network share.

echo "//192.168.1.199/share1 /mnt/shares/media cifs credentials=/root/.smbcredentials,_netdev 0 0" >> /etc/fstab

However the instructions for a permanent share will not work. Hoping someone might be able to advise.

Shouldn't /etc/fstab end with a blanc line?
It was at least in "the old days" and I still have the habit. But I'm not sure.
Anyway, try to add a blanc line, reboot and watch the result. Doesn't harm...


All times are GMT -5. The time now is 03:33 PM.