Linux/Windows Samba Share

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Noobie-Wan-Kenobe

Linux/Windows Samba Share

Post by Noobie-Wan-Kenobe »

Hi all,
As my username suggests, yes - I'm a noobie! I've been trying to network my newly configured Mint pc with just one of my Windows7 PCs to start out. I've got a combination of a few Win7 PCs and a couple of Win7 laptops in my home network. Like many of you, I'm trying to jump off the MS merry-go-round! :) For the past few weeks, I've been banging my head against the wall trying to see folders in my Mint PC from my Win7 PC. So far, it's been only a 1-way street. I can see my Win7 folders from Mint by entering command line such as, "smb://dad-win7-pro/downloads/" in the loaction field in File Manager. I know even that's still a workaround (and not correct) because you'd typically see folder icons in a directory like in a typical OS. I don't want to type everytime to access a folder.

I've tried some other suggestions from users in this topic but to no avail. I've edited samba.conf and tried atrandum's and altair4's suggestions by adding "client max protocol = NT1", and "force user = your-linux-user-name", then reboot but still no go. Also, installed WinSCP from Eric's workaround in my Win7 pc, but always get the same error message, "Network error: Connection to xxx.xxx.x.xxx refused." :cry: Tried numerous times but still no go. Posting following commands suggested by altair4 so you can see how I'm set up. Hopefully I'm providing this info correctly. Please bear with me if I'm not. If you need more info from me, let me know. Thanks for all your help in advance.
_____________________________________________________________________________________________________________

Code: Select all

$ inxi -Fxz
System:
  Host: dadAspireX3400 Kernel: 4.18.0-14-generic x86_64 bits: 64 
  compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.8 
  Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic 
Machine:
  Type: Desktop Mobo: Acer model: Aspire X3400 serial: <filter> BIOS: AMI 
  v: P01-B1 date: 04/02/2010 
CPU:
  Topology: Triple Core model: AMD Athlon II X3 435 bits: 64 type: MCP 
  arch: K10 rev: 2 L2 cache: 1536 KiB 
  flags: lm nx pae sse sse2 sse3 sse4a svm bogomips: 17399 
  Speed: 800 MHz min/max: 800/2900 MHz Core speeds (MHz): 1: 800 2: 800 
  3: 800 
Graphics:
  Device-1: AMD Cedar [Radeon HD 5000/6000/7350/8350 Series] 
  vendor: Micro-Star MSI driver: radeon v: kernel bus ID: 02:00.0 
  Display: x11 server: X.Org 1.19.6 driver: ati,radeon 
  unloaded: fbdev,modesetting,vesa resolution: 1920x1080~60Hz 
  OpenGL: renderer: AMD CEDAR (DRM 2.50.0 / 4.18.0-14-generic LLVM 6.0.0) 
  v: 3.3 Mesa 18.0.5 direct render: Yes 
Audio:
  Device-1: NVIDIA MCP72XE/MCP72P/MCP78U/MCP78S High Definition Audio 
  vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel 
  bus ID: 00:07.0 
  Device-2: AMD Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] 
  vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 02:00.1 
  Sound Server: ALSA v: k4.18.0-14-generic 
Network:
  Device-1: NVIDIA MCP77 Ethernet vendor: Acer Incorporated ALI 
  driver: forcedeth v: kernel port: c880 bus ID: 00:0a.0 
  IF: enp0s10 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:
  Local Storage: total: 931.51 GiB used: 17.96 GiB (1.9%) 
  ID-1: /dev/sda vendor: Seagate model: ST31000528AS size: 931.51 GiB 
Partition:
  ID-1: / size: 191.25 GiB used: 17.89 GiB (9.4%) fs: ext4 dev: /dev/sda1 
Sensors:
  System Temperatures: cpu: 26.5 C mobo: N/A gpu: radeon temp: 59 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 229 Uptime: 11h 13m Memory: 7.79 GiB used: 3.37 GiB (43.2%) 
  Init: systemd runlevel: 5 Compilers: gcc: 7.3.0 Shell: bash v: 4.4.19 
  inxi: 3.0.27 
_____________________________________________________________________________________________________________

Code: Select all

$ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[share]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	client max protocol = NT1
	client use spnego = No
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	name resolve order = bcast host lmhosts wins
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	security = USER
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	idmap config * : backend = tdb
	force user = dad


[printers]
	browseable = No
	comment = All Printers
	create mask = 0700
	path = /var/spool/samba
	printable = Yes


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
	read only = No
	valid users = dad


[share]
	comment = Ubuntu File Server Share
	create mask = 0755
	guest ok = Yes
	path = /home/dad/Documents/Lubuntu
	read only = No
	
____________________________________________________________________________________________________________

Code: Select all

$ net usershare info --long
[Documents]
path=/home/dad/Documents
comment=Share this folder under Home
usershare_acl=Everyone:F,
guest_ok=y

[Lubuntu]
path=/home/dad/Documents/Lubuntu
comment=
usershare_acl=Everyone:F,
guest_ok=y
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
OssieJohn

Re: Linux/Windows Samba Share

Post by OssieJohn »

I have the same problem, at least in part, but it only took force on my last system upgrade - on the 2nd Feb 2019.

Now I cannot access other Linux Mint machines, or a newly built LXDE 3 machine, that is also unable to access most external shares.

I can still access a Raspberry Pi 2 running Raspbian, and my QNAP NAS.

It may be related that I can no longer access my email form and independent mail provider (Alpha.net.au), Gmail and Hotmail accounts from Thunderbird, but I can still access my email from my ISP. I can access all three of those accounts via browser access.

Thank you in advance for any help.
-----------------------------
Sysinfo
-----------------------------
System information report, generated by Sysinfo: 3/02/2019 9:26:33 PM
http://sourceforge.net/projects/gsysinfo

SYSTEM INFORMATION
Running LinuxMint Linux, the LinuxMint 19.1 (tessa) release.
GNOME: 3.28.2 (Ubuntu)
Kernel version: 4.18.0-14-generic (#15~18.04.1-Ubuntu SMP Mon Jan 14 11:09:26 UTC 2019)
GCC: 7 (x86_64-linux-gnu)
Xorg: 1.19.6 (25 October 2018 04:11:27PM) (25 October 2018 04:11:27PM)
Hostname: csirac
Uptime: 0 days 8 h 53 min

CPU INFORMATION
AuthenticAMD, AMD FX(tm)-8350 Eight-Core Processor
Number of CPUs: 8
CPU clock currently at 1404.025 MHz with 2048 KB cache
Numbering: family(21) model(2) stepping(0)
Bogomips: 8027.27
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd ibpb vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold

MEMORY INFORMATION
Total memory: 32068 MB
Total swap: 34263 MB

STORAGE INFORMATION
SCSI device - scsi0
Vendor: ATA
Model: Samsung SSD 860
SCSI device - scsi1
Vendor: ATA
Model: Samsung SSD 840
SCSI device - scsi2
Vendor: ATA
Model: WDC WD60EZRZ-00R
SCSI device - scsi3
Vendor: ATA
Model: ST12000VN0007-2G

HARDWARE INFORMATION
MOTHERBOARD
Host bridge
Advanced Micro Devices, Inc. [AMD] Family 15h Processor Function 5
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] RD9x0/RX980 Host Bridge
PCI bridge(s)
Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GFX port 0) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP Port 0) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD990 PCI to PCI bridge (PCI Express GFX2 port 0) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] RD890/RD9x0/RX980 PCI to PCI bridge (PCI Express GPP2 Port 0) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40) (prog-if 01 [Subtractive decode])
Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] SB900 PCI to PCI bridge (PCIE port 2) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD/ATI] SB900 PCI to PCI bridge (PCIE port 3) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD] Device 1470 (rev c1) (prog-if 00 [Normal decode])
Advanced Micro Devices, Inc. [AMD] Device 1471 (prog-if 00 [Normal decode])
ISA bridge
Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller

GRAPHIC CARD
VGA controller
Advanced Micro Devices, Inc. [AMD/ATI] Vega [Radeon RX Vega] (rev c1) (prog-if 00 [VGA controller])
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Vega 10 XT [Radeon RX Vega 64]

SOUND CARD
Multimedia controller
Advanced Micro Devices, Inc. [AMD/ATI] Device aaf8
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Device aaf8

NETWORK
Ethernet controller
Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
Subsystem: ASUSTeK Computer Inc. P8 series motherboard
-----------------------------
smb.conf
-----------------------------
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
# - When such options are commented with ";", the proposed setting
# differs from the default Samba behaviour
# - When commented with "#", the proposed setting is the default
# behaviour of Samba but the option is considered important
# enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
client ntlmv2 auth = no
client use spnego = no
client lanman auth = yes
client ipc signing = disabled
encrypt passwords = no

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
# syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam

obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
# logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
# logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.
# The following assumes a "machines" group exists on the system
; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
browseable = yes

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
; read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
; valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

[transfer]
comment = Transfer directory
path = /home/jcp/Public/transfer
writeable = yes
browseable = yes
valid users = jcp

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
; write list = root, @lpadmin
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Linux/Windows Samba Share

Post by altair4 »

@Noobie-Wan-Kenobe, I don't see anything wrong with how you are set up so let's see if you can see your own Mint machine with this command:

Run this command from the terminal:

Code: Select all

smbtree
Does it list all your SMB hosts - including your Mint machine?

Fun Fact:
I can see my Win7 folders from Mint by entering command line such as, "smb://dad-win7-pro/downloads/" in the loaction field in File Manager. I know even that's still a workaround (and not correct) because you'd typically see folder icons in a directory like in a typical OS.
There are two ways Windows 10 can scan the network for SMB hosts: NetBIOS and WSD. In Win10 the SMBv1 client is eventually disabled and when that happens it can no longer see any hosts via NetBIOS. Linux can only broadcast by NetBIOS and it doesn't - at least by default - use WSD - so it's no longer "typical" for an OS to see all hosts in the file manager.

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Noobie-Wan-Kenobe

Re: Linux/Windows Samba Share

Post by Noobie-Wan-Kenobe »

Hi altair4,

smbtree was not installed in my system, so I had to install smbclient. I didn't understand what you said about WSD for Win10 as I'm running Win7 on my home PCs; I need to read up on it. Following is the results after executing smbtree. Don't know if the following results answered your question, "Does it list all your SMB hosts - including your Mint machine?" What do the results mean? :? Please reply. Thanks.

dad@dadAspireX3400:~$ smbtree

Command 'smbtree' not found, but can be installed with:

sudo apt install smbclient

dad@dadAspireX3400:~$ ^C
dad@dadAspireX3400:~$ ^C
dad@dadAspireX3400:~$ sudo apt install smbclient
[sudo] password for dad:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
heimdal-clients
The following NEW packages will be installed:
smbclient
0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded.
Need to get 352 kB of archives.
After this operation, 1,772 kB of additional disk space will be used.
Get:1 http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive bionic-updates/main amd64 smbclient amd64 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 [352 kB]
Fetched 352 kB in 0s (1,187 kB/s)
Selecting previously unselected package smbclient.
(Reading database ... 286278 files and directories currently installed.)
Preparing to unpack .../smbclient_2%3a4.7.6+dfsg~ubuntu-0ubuntu2.6_amd64.deb ...
Unpacking smbclient (2:4.7.6+dfsg~ubuntu-0ubuntu2.6) ...
Setting up smbclient (2:4.7.6+dfsg~ubuntu-0ubuntu2.6) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
dad@dadAspireX3400:~$ smbtree
dad@dadAspireX3400:~$ ^C
dad@dadAspireX3400:~$ ^C
dad@dadAspireX3400:~$ sudo smbtree
dad@dadAspireX3400:~$ sudo apt install smbclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
smbclient is already the newest version (2:4.7.6+dfsg~ubuntu-0ubuntu2.6).
0 upgraded, 0 newly installed, 0 to remove and 228 not upgraded.
dad@dadAspireX3400:~$ ^C
dad@dadAspireX3400:~$
User avatar
CaptainKirksChair
Level 4
Level 4
Posts: 456
Joined: Sat Feb 18, 2017 9:29 pm

Re: Linux/Windows Samba Share

Post by CaptainKirksChair »

I have found that when I have the Linux firewall enabled, I cannot access any other Linux devices over the network. As soon as I disable the firewall, I have no problems with Samba. There may be a rules setting you can use to allow specific devices through the firewall but I have never done that and cannot speak to those configuration options.

Try disabling the firewall and see what happens. Don't forget to re-enable it if nothing changes. If the problem goes away, at least you know where your next learning experience will be.
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Linux/Windows Samba Share

Post by altair4 »

**** No output from smbtree means something is broke on your system.

Could be nmbd isn't running:

Code: Select all

sudo service nmbd restart
Could be the firewall as CaptainKirksChair suggested:

Code: Select all

sudo ufw disable
**** My advice is to see if samba itself is working. You do that by accessing the Mint machine from Win7 by it's ip address:

Find your ip address on Mint by running this command:

Code: Select all

hostname -I
Then on Win7 access the machine by that ip address ... so if Mints ip address is 192.168.1.100 ...

Code: Select all

\\192.168.1.100
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
OssieJohn

Re: Linux/Windows Samba Share

Post by OssieJohn »

Thank you altair4 and CaptainKirksChair.

It tried smbtree, after adding it. All I got was the cursor return, no data at all. I tried enabling (although I believe those services were already enabled) and restarting smbd.service and nmbd.service, with no change. I even tried it as the superuser.

What did work, but is definitely not recommended, was to change the permissions on the server computer to allow guest access. Although the properly defined access did not work, I could gain access as guest, without supplying any identification. Fortunately that server machine is only switched on when it is needed. But it did give me access today. Obviously I will turn off guest samba access when this issue is resolved.

I should add that I cannot access that server from Librelec 9 either. That is running on an Odroid C-2 single board computer. As I still have the version 8.4 boot microSD I can boot the Libreelec machine to 8.4 confirm if it still has properly arbitrated access.

To me this seems to indicate that there is nothing wrong with Samba access per se, but something terribly screwed up in the passing of, and acceptance of, permission data?

That might also explain why I cannot get access to any mail servers through Thunderbird, although I can through Firefox.

I am getting to the point of building a spreadsheet detailing what machines and software work with what other machines and internet services. :( John.
Noobie-Wan-Kenobe

Re: Linux/Windows Samba Share

Post by Noobie-Wan-Kenobe »

To altair4 and CaptainKirksChair:

Thanks for your quick replies.

Yes, I disabled Mint's firewall, and then restarted nmbd. Then I went over to my Win7 pc, and entered my Mint's ip address in the file manager path field. Lo and behold to my surprise, I can see the contents of my MInt's home/documents! I was able to copy files to and from Mint & Win7. But my joy was short-lived for only a few minutes. For grins, I closed out of file manager, and re-entered Mint's ip address to see if it just a fluke or still works. It didn't. I got a couple of error messages. Windows Security dialog box painted up, and prompted for password on Mint pc. I entered it but the same box kept popping up over and over.

Also ran WinSCP, entered ip address, then see this same error message: Network error: Connection to xxx.x.xxx.x.xxx refused. So it was working and I was able to see Samba shares from Win7 - if only for a short while. At least we were partially successful.
But why did it stopped working after the first time? Thoughts? Please reply.
Noobie-Wan-Kenobe

Re: Linux/Windows Samba Share

Post by Noobie-Wan-Kenobe »

To altair4 and CaptainKirksChair:

Also forgot to mention that when I do a smbtree in terminal, nothing happens. I get the following:

dad@dadAspireX3400:~$ smbtree
dad@dadAspireX3400:~$ sudo smbtree
[sudo] password for dad:
dad@dadAspireX3400:~$

It doesn't list my SMB hosts at all - including your Mint machine. What does this mean? Please reply. Thanks.
altair4
Level 20
Level 20
Posts: 11450
Joined: Tue Feb 03, 2009 10:27 am

Re: Linux/Windows Samba Share

Post by altair4 »

Noobie-Wan-Kenobe wrote: Tue Feb 05, 2019 11:14 pm Then I went over to my Win7 pc, and entered my Mint's ip address in the file manager path field. Lo and behold to my surprise, I can see the contents of my MInt's home/documents! I was able to copy files to and from Mint & Win7.
OK, so samba is working ... at least it did.
But my joy was short-lived for only a few minutes. For grins, I closed out of file manager, and re-entered Mint's ip address to see if it just a fluke or still works. It didn't. I got a couple of error messages. Windows Security dialog box painted up, and prompted for password on Mint pc. I entered it but the same box kept popping up over and over.
That I cannot explain. Every possible scenario I can think of ( encrypted home directory, the Win7 and Mint machines are in different subnets , etc.. ) would have prevented your original connection.
It doesn't list my SMB hosts at all - including your Mint machine. What does this mean?
It means name resolution isn't working. With the name resolve order setting you have in your smb.conf it should work but it's not which is why I suggested doing this by ip address. Worst case you could ( or your router could ) set up static ip addresses and you could bookmark your hosts instead. But even that doesn't work consistently in your case.

Edit: I wonder if your WIn7 machine is acting more like a WinXP machine. You've got nothing to lose at this point so:

** Edit smb.conf
** Right under the workgroup = WORKGROUP line add these 2:

Code: Select all

lanman auth = yes
ntlm auth = yes
** Save the file then restart smbd: sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
rac

Re: Linux/Windows Samba Share

Post by rac »

I stumbled across this forum today while trying to make Windows 10 and Linux Mint 19.1 share files, THANK YOU to all that have contributed!
For me, turning off the firewall (using sudo ufw disable) got me to the point where I could map the Mint shared directory on the Windows 10 machine.
It worked by IP & Name.
Now I am going to do some more reading to learn how to access the Windows 10 machine from the Mint machine!
All part of the fun!
Thanks Again for the help!
RAC>>
User avatar
CaptainKirksChair
Level 4
Level 4
Posts: 456
Joined: Sat Feb 18, 2017 9:29 pm

Re: Linux/Windows Samba Share

Post by CaptainKirksChair »

My recommendation is to put rules in the Mint firewall to allow specific IP addresses through. That's the only thing I can think of that may work. Then again, it may not. And you will most likely have to use static IP addresses on all of your devices so you can do the firewall rules. Again, I have never done this but it must be possible because it is an option.
Noobie-Wan-Kenobe

Re: Linux/Windows Samba Share

Post by Noobie-Wan-Kenobe »

To altair4 and CaptainKirksChair:

Thanks again for your replies. I've been playing around with some settings and been reading other networking topics. I followed altair4's advice and entered my hostname: \\mint-host-name in my Win7 machine - and it worked! I can see my Mint shares, and able to copy files to and fro; It does not work, however, when I input my Mint ip address :? - that pesky Windows Security dialog keeps popping up. :x

Question: How do I configure my Mint firewall to "put rules in the Mint firewall to allow specific IP addresses through"? It appears that my Win7 pc only sees my Mint shares when I enter the Mint's hostname and select allow for incoming in the firewall rules - is that an absolute no-no for my home network? It would be very frustrating to enter hostname everytime when I need to network. Could you please walk me through the correct configuration settings and rules in the firewall? See attached screen captures. I added 4 firewall rules from a Joe Collins YouTube tutorial. Please let me know if you're able to view the screen captures.

Thanks again for all your help.
Locked

Return to “Networking”