No access to any network resource after install samba

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
marcelm

No access to any network resource after install samba

Post by marcelm »

Hi there fellow mint users,

I am new here but I am using Linux for many years now. Since a few years switched from Kubuntu to Mint KDE. I use it on my workstation. For all these time I always run into the same very annoying problem which I never can solve. I have searched over the internet trying to find a solution but nothing I have tried works! And this is going on for years now and driving me nuts. So, I have decided that I can not solve it myself and need to ask for help. Oh this problem has always been with all the Linux distro's I have used over the years..

Normally after install networking works fine. I have a ZFSguru (BSD) server which serves the network with Samba shares. I can access them normally "out of the box". Always at a certain point it becomes necessary to install Samba. But when I do this, I can not access ANY network resource anymore. When i try to access a windows share, always a request for username and password will pop up (of course, the server is configured to ask for this). When I fill in those requested username and password, the request dialog will simply pop up again to ask for username and password. And again, and again, and again. Accessing the shares on the server from ANY other device (Windows 7 laptop, Samsung Galaxy note, Windows 10 Gaming PC) will work just fine. So in my opinion the server is configured just fine.

I have tried everything from uninstalling Samba and everything related (/usr/lib/samba, /usr/share/samba, /etc/samba), reinstalling and many more stuff. Many times I would just re-install the whole OS just to save me the time and headaches. But the real problem was never solved, so I hope someone reads this and knows what might be going on here. I guess it has something to do with communication about login credentials but I am not a Linux wizard. Or the interconnection in Linux with Samba. Anyway, I am getting scared when I read the word Samba ;-)) because all of this.

So, is there anyone with an idea what is going wrong with Linux and simple plain sharing on my network? If any questions I will try to provide as much information as I can get. Also I think many others will benefit, since I am not the only one. There should be a simple step by step manual for this, maybe someone knows where?

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: No access to any network resource after install samba

Post by altair4 »

Normally after install networking works fine. I have a ZFSguru (BSD) server which serves the network with Samba shares. I can access them normally "out of the box". Always at a certain point it becomes necessary to install Samba. But when I do this, I can not access ANY network resource anymore.
You are asking this question in the wrong forum.

Samba and by that I assume you mean the samba server package is already installed in Mint by default. There was nothing to install if you are running Mint.

I'm not a KDE user any longer so I don't know how many possible layers of obfuscation KDE applies to samba fundamentals but if you want you can post the output of the following command and I will see if there is some obvious thing messed up:

Code: Select all

testparm -s 
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
marcelm

Re: No access to any network resource after install samba

Post by marcelm »

Hi there altair4,

Why am I asking this in the wrong forum? It says Networking :? I thought Samba is about networking? Anyway, thanks for replying. I removed all the configuration files and re-installed samba, but samba install did not place 2 of the 3 samba directories back (in etc and usr/lib) . I don't know why? Now testparm -s gives me this:

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf":
Bestand of map bestaat niet (<-- folder not existing)
Error loading services.

So I have to replace these myself I guess?

I did install samba using "sudo apt-get install samba" because when I want to create a shared folder i got the message that to share a folder I need to install the package "samba"
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: No access to any network resource after install samba

Post by altair4 »

marcelm wrote:Why am I asking this in the wrong forum? It says Networking :? I thought Samba is about networking?
It's not that you posted in the wrong section of this forum it's that you posted in the Mint forum.

Samba does not need to be installed. It's installed by default in Mint. If this is Ubuntu then you would need to install Samba. If you are using Mint you have a bad install or you installed from a bad ISO.

What package did you install?

As for the error message I don't know where to begin but it sounds like you don't have smbclient or samba-common installed..

EDIT: I just booted into the Mint 17 KDE DVD and tried to install samba:
mint@mint:~ > sudo apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mint@mint:~ >
It's even installed and operational in a LiveDVD session.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
marcelm

Re: No access to any network resource after install samba

Post by marcelm »

Thanks, you are right. I have a laptop with a fresh install of Linux Mint 17.2 Rafaela KDE x64 and sharing folder on the network works perfectly. Now I can be more specific what happens though. When I share a folder on the laptop with Mint, I can access it on the network from my windows PC. But, when I want to access a share on my server from the same Mint laptop I get a dialog where I have to enter my credentials. When I fill in the login name and password, the dialog screen goes away and immediately returns on the screen with the credentials still there. This will repeat every time I press "OK". If I press "Cancel" access to the share is rejected. The workstation with the same version of mint (I have new samba (v4.3.0) compiled and installed on this one because it's original install was damaged) does exactly the same. Here too I can access it's shares over the network, but when I want to log in from this machine into a share on the server the same dialog issue occurs. With other machines (Windows 10, Windows 7 and various Android devices) access to the server shares is just working after providing the username and password. So, I am pretty sure it has to do with the way Mint or KDE handles the password procedure. What I don't know is how to troubleshoot this. I will continue searching the internet and I will post this issue on the KDE forum as well, because in Kubuntu the same would happen I remember...

About his dialog,

With the Mint laptop:
When I browse to "Network" in Dolphin, I click "Sambanetwork" and then "Delta" (my working group name). After clicking "Delta" the list with devices in this group is accessible. If I click on "ZFSguru" (server), a list with shares is presented. After clicking a random share, the dialog will come up and then the problem is as mentioned above.

With the Mint workstation:
When I browse to "Network" in Dolphin, I click "Sambanetwork" and then "Delta", the dialog will come up and then the problem is as mentioned above.

So there is a slight difference where this dialog will pop up but the problem looks the same to me. from both machines, I will copy and paste the result of "testparm -s"

The Mint laptop:

marcel@laptop:/ > testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
workgroup = DELTA
server string = %h
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

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

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

The Mint workstation:

marcel@workstation:/ > testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "null passwords" option is deprecated
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
Processing section "[homes]"
Processing section "[netlogon]"
Processing section "[profiles]"
Processing section "[printers]"
Processing section "[pdf-documents]"
Processing section "[pdf-printer]"
Loaded services file OK.
WARNING: You have some share names that are longer than 12 characters.
These may not be accessible to some older clients.
(Eg. Windows9x, WindowsMe, and smbclient prior to Samba 3.0.)
Server role: ROLE_STANDALONE
[global]
workgroup = DELTA
server string = Samba file server
interfaces = 127.0.0.1/8, 192.168.1.0/24
bind interfaces only = Yes
client schannel = No
server schannel = No
allow trusted domains = No
obey pam restrictions = Yes
guest account = smbguest
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
passwd chat timeout = 120
username map = /etc/samba/smbusers
username level = 6
unix password sync = Yes
log file = /var/log/samba/samba.log
max log size = 1000
name resolve order = wins, lmhosts, bcast
client signing = No
server signing = No
client use spnego = No
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = cups
machine password timeout = 120
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
delete user script = /usr/sbin/userdel '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
logon script = %G.bat
logon path = \\%L\profiles\%u
logon drive = m:
logon home = \\%L\homes\%u
os level = 33
local master = No
domain master = No
dns proxy = No
remote announce = 192.168.1.255
remote browse sync = 192.168.1.255
template shell = /dev/null
winbind separator = @
winbind cache time = 360
winbind use default domain = Yes
winbind trusted domains only = Yes
winbind nested groups = No
winbind nss info = no
idmap config * : range = 16777216-33554431
idmap config * : backend = tdb
hosts allow = 127., 192.168.1.
cups options = raw
follow symlinks = No

[homes]
comment = Home Directories
path = /home
valid users = %U
read only = No
locking = No
strict locking = No

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
locking = No
strict locking = No

[profiles]
comment = User Profiles
path = /var/lib/samba/profiles
read only = No
create mask = 0600
directory mask = 0700
locking = No
strict locking = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
print ok = Yes
browseable = No
locking = No
strict locking = No

[pdf-documents]
comment = Converted PDF Documents
path = /var/lib/samba/pdf-documents
admin users = %U
read only = No
guest ok = Yes
locking = No
strict locking = No

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

I have one more thing to add; the Mint laptop can see and access shares on the Mint workstation and the shares on the server, but not shares on the Windows gaming PC, again, other devices can. The Mint workstation will not enter the workgroup, so will not see any share..

/edit: now, after successfully logging into the Windows gaming PC share with the Mint laptop, using ANOTHER username and password (the Windows PC has another user), I can not log into the server AND the Windows machine. The Linux Mint shares I can access ?!?! :? :? :? Android and Windows devices keep being able to access everything though...

/edit 2: The config for the Mint workstation is longer because I used Gadmin-Samba (0.3.2) to configure.
marcelm

Re: No access to any network resource after install samba

Post by marcelm »

Ok I reply to my own topic with a working solution. I found this topic on KDE forums: https://forum.kde.org/viewtopic.php?f=1 ... 22#p341622 After installing smb4k like someone suggested here I am able to access everything on my network! Including image preview, playing music from my NAS with Amarok, which I never was able before with KDE... I think this should be integrated in KDE because it solves everything not working on the network. Also one does not have to be a rocket scientist to be able to do simple stuff.

Thanks for looking into this and maybe the topic deserves to be looked into further, but I will mark it "solved" anyway now. :D :) :mrgreen:
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: No access to any network resource after install samba

Post by altair4 »

For future reference only: Some unsolicited advice:

Your "Mint Workstation" has an smb.conf that looks a lot like what gadmin-samba does. The people who put Linux distros together or inherit base repositories from other distros don't understand Samba so they keep gadmin-samba alive.

Gadmin-samba was state of the art when Eisenhower was still in Europe which is why testparm posted so many "what the hell is this" errors:
WARNING: The "null passwords" option is deprecated
Unknown parameter encountered: "password level"
Ignoring unknown parameter "password level"
Unknown parameter encountered: "update encrypted"
Ignoring unknown parameter "update encrypted"
WARNING: The "idmap uid" option is deprecated
WARNING: The "idmap gid" option is deprecated
All of those options fully operational when Samba was at Version 2 or early Version 3 but we are at Version 4 now.

You might not want to use it when you build your next machine.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
marcelm

Re: No access to any network resource after install sambaa

Post by marcelm »

Ok I see.. I have gadmin-samba on my system. So why it is in the repositories (used software manager) if it is so out of date? I used it to generate a smb.conf since I deleted all samba folders with everything in it too. Also I installed other tool like system-config-samba. Should I remove gadmin-samba from my system? Or just disable the faulty options. And should I clean up the smb.conf manually or are there good tools for that?

You are right I do not know as much about Samba as I would like but I did invest many hours, days to try to get it to work properly. I was forced to learn. In a Windows system networking is so much easier, but also not always without trouble I must add... The password problem is not solved because without smb4k I still can not access resources on my network and the password screen keeps popping up. So this looks like a real bug to me...
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: No access to any network resource after install samba

Post by altair4 »

Your systems are in far too delicate a condition to make any changes at this point if everything works - albeit by using smb4K.

As far as gadmin-samba or even system-config-samba ( still outdated but far less destructive ) I would just point out that neither one of them are required to access shares on someone else's machine. They are only used to create shares for someone else to access. And on both the laptop and the workstation you have no samba shares defined. The exception being the [homes] share that gadmin-samba automatically creates.

I'm guessing if you are accessing any shares on either of these machines you created them from Dolphin. Dolphin creates something called a Samba Usershare. You can get a list of those shares by running this command:

Code: Select all

net usershare info --long
It's still a samba share but it's share definitions are not in smb.conf. They are in /var/lib/samba/usershares.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”