On 30/03/2025 13:39, Rowland Penny via samba wrote :> smbclient //PHONE_IP/SHARENAME -Uuser_on_phone%password > > If this works, you should find yourself at a Samba prompt 'smb: \>' > > If you get this far, you have proved that Samba is working between your > phone and your client. > > A couple of examples: > > smbclient -NL 192.168.1.125 -p 4445 > > Sharename Type Comment > --------- ---- ------- > server Disk > IPC$ IPC IPC Service (Samba Client bookstand) > SMB1 disabled -- no workgroup available > > smbclient //192.168.1.125/server -p 4445 -Urowland%xxxxxx > Try "help" to get a list of possible commands. > smb: \> > > This is to a standalone server with: > > disable netbios = yes > smb ports = 4445 > > in smb.conf > > If you can connect to your phone from your client, you should then try > to connect to the phone from your camera, if this works, then okay, if > it doesn't, then it is possible that you require SMBv1 and if so, you > need to run it everywhere, even if it is insecure. > Add: > > nbt port = 1137 > to your smb.conf on the phone and start the nmbd deamon > ... > Rowland >Hi Rowland> disable netbios = yes > smb ports = 4445 > nbt port = 1137Does it make sense to have these 3 all together? I can't get the Internet to clearly tell me if I can have name resolution without smb1 and without dns, i.e only having smb2 AND NOT dns. What about the error smb1 unix extensions unknown parameter ? I can connect the server's //IP/Share with SMB2 from PC & camera but I can't from both with //serverName/share even when I have the 3 lines above in smb.conf and server reloaded. I can't the server as root even that my phone is rooted because the package is not intended for that Embedded advice in smb.conf comments is to use high ports 4445 [1139] and iptables I have added these which should allow me to use any clients without specifying "-p port" : iptables -t nat -A PREROUTING -p udp --destination-port 137 -j REDIRECT --to-port 1137 iptables -t nat -A PREROUTING -p tcp --destination-port 139 -j REDIRECT --to-port 1139 iptables -t nat -A PREROUTING -p tcp --destination-port 445 -j REDIRECT --to-port 4445
On Sun, 30 Mar 2025 17:58:10 +0200 f0rhum via samba <samba at lists.samba.org> wrote:> > Hi Rowland > > > disable netbios = yes > > smb ports = 4445 > > nbt port = 1137 > > Does it make sense to have these 3 all together?Well, no. The first two together, or the last two together, but not all three together, you need netbios for the nbt port.> I can't get the > Internet to clearly tell me if I can have name resolution without > smb1 and without dns, i.e only having smb2 AND NOT dns. What about > the error smb1 unix extensions unknown parameter ?As I said 'smb1 unix extensions' replaced 'unix extensions' (this is for the upcoming 'smb3 unix extensions), so if your Samba version isn't new enough, use 'unix extensions' instead.> > I can connect the server's //IP/Share with SMB2 from PC & camera > but I can't from both with //serverName/share even when I have the 3 > lines above in smb.conf and server reloaded.To use a hostname (or as you put it 'serverName'), you need to run a dns server, or Avahi, or use SMBv1.> I can't the server as > root even that my phone is rooted because the package is not intended > for that Embedded advice in smb.conf comments is to use high ports > 4445 [1139] and iptables > > I have added these which should allow me to use any clients without > specifying "-p port" : iptables -t nat -A PREROUTING -p udp > --destination-port 137 -j REDIRECT --to-port 1137 iptables -t nat -A > PREROUTING -p tcp --destination-port 139 -j REDIRECT --to-port 1139 > iptables -t nat -A PREROUTING -p tcp --destination-port 445 -j > REDIRECT --to-port 4445Well that should work, I never thought of it. Rowland