Can't connect to samba...

Hi,

I have installed a samba server on a very old laptop, the smb4.conf is something like this

Code:
[global]
workgroup = workgroup
realm = realm
netibios name = netbios

[netbios]
path = mypath
public = no
printable = no
writable = yes
guestok = no
valid users = myuser

I have logged into another FreeBSD machine (where I have a different samba server installed but I don't know if this is the root the problem) and throughout the console, just after the login as root I write the following command:

mount_smbfs -I 192.168.1.123 //myuser@netbios/ /mnt
and I get the message
Code:
mount_smbfs: empty share name

then I try something else like

mount_smbfs -I 192.168.1.123 //myuser@netbios/mypath/ /mnt
or instead of the folder "mypath" I put the name of the folder I know it's inside the shared folder like mount_smbfs -I 192.168.1.123 //myuser@netbios/folder_name/ /mnt
and I get the message
Code:
mount_smbfs: unable to open connection: syserr = Operation timed out

then if u try it again I get the message
Code:
smb_smb_negotiate: Dono't know how to talk with serve xxx (65535)
mount_smbfs: unable to open connection: syserr = RPC struct is bad

I really have no idea how to fix this. Can you help me?

p.s. I have also tried to stop the server in the client computer with service samba_server stop but I guess it wasn't that because i get the same message :\
 
don't you have to set server min protocol in smb4.conf then ?
Yes, SMBv1 is disabled by default nowadays.
Code:
   client min protocol = NT1
   server min protocol = NT1
   ntlm auth = ntlmv1-permitted

Take note however, SMBv1 is horrendously insecure and has been disabled for good reason.
 
Stop right here. Regarding SMBv1, we should really pretend it doesn't exist. In my personal opinion, https://reviews.freebsd.org/D32707 should have been accepted...

I keep hearing rumors about plans to finally implement newer SMB versions in FreeBSD. That would be very nice. But until it is done, the take-away should be FreeBSD does not support the SMB file system (of course you can still run samba, providing a fully functional SMB server). For the time being, the only network file system usable on a FreeBSD client is NFS. Make it NFSv4 with kerberos to get decent security.

My file server (in a jail) offers both btw, Windows clients use SMB, all others NFS (to access the "same" shares).
 
Had to enable SMBv1 so I could share a CD image though IPMI to reinstall it remotely, old system, old IPMI, does not support anything other than SMBv1. But the Samba server is turned off and only enabled when needed.
 
as long as you know when you're playing with fire and how to control it ... 😏

But yeah, don't do that at home in production.
 
thanks to all of you. I really mean it.

The lessons I take with me today is:
1. I should stop pretending to know what i'm doing :) keep the samba server online but access only with windows/tablets/tv etc...
2. I should start digging online on how to set up the NFS on the server

Considering that i have put the server in a very unconfortable place because i thought i could connect far away from the confort of my living room i sadly have to skip the idea to turn smb1 on and off (though that would have been exactly what i had in mind if the pc was close to me).
 
Yeah, don't open Samba (or NFS) to the internet, regardless of the authentication used. If you want to have a safer option to share files with SMB or NFS remotely consider using a VPN to connect to the remote server. Or, in many cases, a 'simple' scp(1) or sftp(1) will do. You could also do rsync(1) over ssh(1).
 
Yeah, don't open Samba (or NFS) to the internet, regardless of the authentication used. If you want to have a safer option to share files with SMB or NFS remotely consider using a VPN to connect to the remote server. Or, in many cases, a 'simple' scp(1) or sftp(1) will do. You could also do rsync(1) over ssh(1).
i don't even know how to do that (unless it's open by "default" but i don't think so).
And yes... i always use rsync to move files even within the machine because of the confort of the --progress parameter.
 
Back
Top