Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Samba is not working but smbclient does

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
JavScars
Posts: 4
Joined: 2018-08-08 17:50

Samba is not working but smbclient does

#1 Post by JavScars »

I want to explore my windows network but Samba isn't working on nautilus or thunar.
These are the characteristics

- The icon Windows Network is there. But if i try to open it keeps on "Opening <<smb:///>> forever.

- On Nautilus if i try to put "smb://serverIP/folder", it shows me an login windows, but as soon as i click on connect, it says that it failed to mount the windows folder and gives me the message: the file alredy exist.

- mount .-t cifs //Server-IP/folder/ /media/folder" and it gives me the next error "mount error(127): Key has expired

- smb4k doesn't detect anything.

- If i do smbclient \\\\ServerPC\\Folder it works!

- I tried to change the configuration file /etc/samba/smb.conf but it doesn't work. then i use gadminSamba to generate a new file and doesn't work eigther... So i change it a bit there is

Code: Select all

    [global]
netbios name = Samba24
server string = Samba file and print server
workgroup = workgroup
client lanman auth = yes
client min protocol = SMB2
client max protocol = SMB3
security = user
hosts allow = 192.168.121.0/24
interfaces = wlp2s0 192.168.121.0/24
bind interfaces only = yes
remote announce = wlp2s0 192.168.121.255
remote browse sync = wlp2s0 192.168.121.255
printcap name = cups
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
username level = 6
encrypt passwords = yes
unix password sync = yes
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = yes
wins proxy = no
dns proxy = no
preserve case = yes
short preserve case = yes
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
passdb backend = tdbsam
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
locking = no
strict locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
locking = no
strict locking = no

[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
available = yes
browseable = no
writable = yes
guest ok = no
public = no
printable = no
create mode = 0600
directory mask = 0700
locking = no
strict locking = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
locking = no
strict locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes
locking = no
strict locking = no

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u
lpq command =
lprm command =

notes:
- wlp2s0 is my wifi interface
- The windows shared resource has no password-user identification
- The server ip is 192.168.121.1
- The server is working as dhcp server and as WiFi acces point.
- I can access to the windows network through another windows pc... or even from an android phone!

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Samba is not working but smbclient does

#2 Post by 4D696B65 »

do you have gvfs-backends installed?
https://packages.debian.org/stretch/gvfs-backends

JavScars
Posts: 4
Joined: 2018-08-08 17:50

Re: Samba is not working but smbclient does

#3 Post by JavScars »

Yes, i do... v-1.30.4-1

JavScars
Posts: 4
Joined: 2018-08-08 17:50

Re: Samba is not working but smbclient does

#4 Post by JavScars »

Ok new info:
"mount -t cifs //IP/folder/ /media/folder/ -o vers=2.0" works
but smbtree doesn't it doesn't give me any output... and i would like to make it work if is possible...

giul51
Posts: 11
Joined: 2016-02-20 19:52

Re: Samba is not working but smbclient does

#5 Post by giul51 »

I have the same problem (more or less): see my post in this section.
I could satisfactorily "by-pass" the problem by using fusesmb, performing the following steps:
1) installing only Samba and smbclient and strictly required dependencies.
2) doing the necessary tuning (smb.conf, smbpasswd etc.) until you get the correct listing of shares by smbtree
and you can correctly access them through smbclient
3) installing fusesmb and making the adjustments suggested in this guide at the Italian Debian Community: it's in Italian, but I suppose
you can easily understand it, also through the english reference supplied.

Now I can perfectly see the network on any browser, including Thunar.

JavScars
Posts: 4
Joined: 2018-08-08 17:50

Re: Samba is not working but smbclient does

#6 Post by JavScars »

For some reason, last night i did apt-get upgrade and samba was updated and it started to work...
But today, when i turned on my computer, it stopped work again.
It makes me thing that maybe is the way the OS starts samba that doesn't work properly.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Samba is not working but smbclient does

#7 Post by kevinthefixer »

JavScars wrote:It makes me thing that maybe is the way the OS starts samba that doesn't work properly.
What, exactly, is the OS? On my Stretch machine, I had to list the host's IP address (rather than its hostname) in /etc/fstab to get it to mount properly.

Post Reply