LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-02-2022, 05:06 PM   #1
haemogoblin
Member
 
Registered: Oct 2015
Location: In a house
Distribution: Raspbian, Xubuntu, Ubuntu
Posts: 34

Rep: Reputation: Disabled
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.

Last edited by haemogoblin; 10-02-2022 at 05:10 PM.
 
Old 10-02-2022, 09:18 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
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.
 
Old 10-02-2022, 09:36 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Per this article, you can enable automounting of a Samba share by adding it to your /etc/fstab file.
 
Old 10-02-2022, 10:10 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
Quote:
Originally Posted by frankbell View Post
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.
 
Old 10-04-2022, 06:02 AM   #5
remmilou
Member
 
Registered: Mar 2010
Location: Amsterdam
Distribution: MX Linux (21)/ XFCE
Posts: 212

Rep: Reputation: 69
Blanc line

Quote:
Originally Posted by haemogoblin View Post
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SMB Shares dont work when SMB is run as a service! CentOS 6 finnsloss Linux - Networking 1 10-14-2011 09:33 AM
newbie: struggling with samba smb.conf and 'access denied'. tonj Linux - Newbie 4 12-12-2009 02:44 PM
Struggling With Smb.conf FLX Linux - Networking 1 05-05-2006 04:42 AM
Creating a SSL connection from smb clients to a smb server scottpioso General 0 11-17-2003 02:33 PM
making smb shares viewable from smb client via web browser scottpioso General 3 11-10-2003 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration