Multiple Samba Client connections.

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
mike175de
Posts: 67
Joined: Sat Sep 05, 2015 4:39 pm

Multiple Samba Client connections.

Post by mike175de »

Hey there,

first of all: Awesome work! Thx a lot for your time! I appreciate that a lot!

I have a few samba-questions and maybe someone could help me out.

1. I used dietpi-config to mount a samba-share which is mounted on boot-time in /mnt/samba.
Is it possible to mount the share in another place on boot-time, e.g. /mnt/samba/data? And if thats possible, which files to I have to edit?

2. I would like to mount not only one samba-share but a few.
Which file do I have to edit and which do I have to use?

Thx a lot for any hint.

Greets, Michael
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Some Samba-Questions

Post by Fourdee »

mike175de wrote:Hey there,

first of all: Awesome work! Thx a lot for your time! I appreciate that a lot!

I have a few samba-questions and maybe someone could help me out.

1. I used dietpi-config to mount a samba-share which is mounted on boot-time in /mnt/samba.
Is it possible to mount the share in another place on boot-time, e.g. /mnt/samba/data? And if thats possible, which files to I have to edit?

2. I would like to mount not only one samba-share but a few.
Which file do I have to edit and which do I have to use?

Thx a lot for any hint.


Greets, Michael
Hi Micheal,

DietPi-Config is only designed to work with one samba mount, so you will need to do another one manually. I would also advise you dont use the dietpi-config samba menu option after doing this, so your multiple setup is not accidentally overwritten.

You will find all the system and samba mounts in:

Code: Select all

/etc/fstab
If you want to make multiple samba mounts, edit fstab:

Code: Select all

nano /etc/fstab
Add another line, change sharename/username/password to your details as required:

Code: Select all

//192.168.0.2/sharename /mnt/samba_2 cifs username=root,password=mypassword,_netdev,iocharset=utf8,sec=ntlm,nofail  0  0
Save a exit nano ctrl+x , then say yes.

Generate the folder for your new mount:

Code: Select all

mkdir -p /mnt/samba_2
Attempt to mount:

Code: Select all

mount -a
You can use the following command to check if the mount worked, look for /mnt/samba_2:

Code: Select all

df -h
List files in /mnt/samba_2

Code: Select all

ls -lha /mnt/samba_2
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
mike175de
Posts: 67
Joined: Sat Sep 05, 2015 4:39 pm

Re: Multiple Samba Client connections.

Post by mike175de »

Thx a lot. Worked like a charm!

Greets
Post Reply