How to connect to Nethserver's Samba server from a linux client?

activedirectory
v7
sharedfolders

(Cliff Nieuwenhuis) #1

NethServer Version: 7.4.1708 (Final)
Module: Samba DC version 4.6.11

The Nethserver Samba setup is working great for the Windows computers in my network, but I have a Linux machine that is not connecting the way I’d like. What I want is to have the Samba share mounted at boot time. In the past I’ve set up my workstation with a line in /etc/fstab that looks like this

//SERVER/Photos		/mnt/photos	cifs	rw,x-systemd.automount,_netdev,credentials=/etc/.credentials		0 0

…but that is not working with the Nethserver server. What I can do is “Browse Network”, see the share, enter my credentials, and connect. That works, but I’d prefer the share to be mounted and ready to use every time I use the workstation. Any help would be appreciated!


(Saito Benkei) #2

I use this string in /etc/fstab in a Nethserver NG 7.4 to connect to a samba share located in a Nethserver NG 6.9 and it works great:

//server/photos /mnt/photos     cifs    credentials=/root/.smbcredentials,_netdev,nounix,noperm,file_mode=0777,dir_mode=0777,rw 0 0

/root/.smbcredentials looks like:

username=userShare
password=passwordShare
domain=server

then

chmod 644 /root/.smbcredentials
chown root:root /root/.smbcredentials

(Rob Bosch) #3

Isn’t it true that as soon you are not on the llan, you get all kinds of error messages that the share can’t be contacted if you add it to fstab?
i just created shortcuts n files application. If you cuoose to store credentials for ever, you get nstant accss, otherwise you need to pass credentials each tme you cnnect.


(Saito Benkei) #4

I found this link with a brief explanation how system try to connect to network shares after the lan connections are up:

http://codingberg.com/linux/systemd_when_to_use_netdev_mount_option