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.
[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.