2
1
I built a new computer with the intention of it being primarily a home file server. I want Samba to use peer to peer networking using NTLM security and user-mode authentication. According to the documentation this is possible, but there are no examples that I could find. In all the googling I have done, I see a lot of people asking how to set this up but it either works for someone else and not for me (no idea what I'm missing), or it doesn't work.
Here is my setup:
- one desktop with Windows 7 64 HP
- one laptop with Windows 7 64 HP
- one desktop with Kubuntu 11.10 (server)
- The two desktops use static IPs, and I have hostnames mapped in the HOSTS files on all three systems.
- I have the same username/password combo on all three systems.
I have been trying for a while now to set up Samba so the Windows 7 systems can see and use it. Even if I can get the server to show up, Windows is unable to log in.
One of the first things I did was to enable LMv2 authentication, which this version of Samba (3.5.11) supports. The workgroup is set correctly. I can normally see the server, but cannot authenticate. Windows homegroup is turned off. Pinging between machines works fine, and the two Windows 7 systems work together flawlessly.
Has anyone gotten this to work? Is there a place I could download a smb.conf that is set up to work in this environment?
Edit: here is a link to the entire smb.conf as it currently stands. Please note that it's probably a mess by this point with all the editing I've done. Here is a condensed version of the [global] section as well.
http://www.johngaughan.net/smb.conf
[global]
workgroup = WORKGROUP
netbios name = DENTALFLAW
server string = %h server (Samba, Ubuntu)
dns proxy = no
interfaces = eth0
bind interfaces only = yes
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = guest
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
client ntlmv2 auth = yes
usershare allow guests = yes
I don't really want to answer my own question but I want this to be useful to others who have tried (almost) everything and gotten nowhere. The specific setting where the default did not work was:
passdb backend = guest
Once I changed this to the following, and reset Samba passwords for both users, everything just started working:
passdb backend = tdbsam
It appears that the issue preventing me from logging in was that Samba was unable to store authentication information in a valid format.
Check
/var/log/log.nmbd
and/var/log/log.smbd
for some hints on what might be going wrong. – Randolf Richardson – 2011-11-12T02:00:10.400(My "upvote" button doesn't work. I'm not sure why. I'll try to upvote your question later.) – Randolf Richardson – 2011-11-12T02:02:08.133
Could you post your [global] section from smb.conf? – Paul – 2011-11-12T02:11:32.287
Posted. Please see the edit at the end of my post. I also posted a link to the entire config. – None – 2011-11-12T05:04:03.337
Have you added the users to the Samba user database using the smbpasswd utility? – jelmer – 2011-11-12T15:16:16.937
Jelmer, you had the correct answer but there is more to it than that. Could you please post your comment as an answer so I can select it? I will add a comment with the specific steps I had to take. – None – 2011-11-12T17:20:16.617