Unable to authenticate users with Samba

I recently installed FreeBSD 8.1/amd64 on a new machine, but now I'm unable to authenticate users with Samba 3.3
I configured the machine as many other times, i.e. using the provided smb.conf, changing the workgroup name and adding a couple of shares. A simple scenario with user security.

The configuration added looks like the following:

Code:
[data]
   comment = Some data
   valid users = test
   path = /path/to/data
   public = no
   writable = yes
   printable = no


I create the unix user "test" (with which I'm able to login on a console), and added it to samba with [cmd=]smbpasswd -a test[/cmd], choosing a password.

Usually after this I'm ready to access the shares, but for some reason samba says that the password is invalid. Moreover, if I try to change the password from the user shell, I obtain the following error

Code:
$ smbpasswd
Old SMB password:
New SMB password:
Retype new SMB password:
Could not connect to machine 127.0.0.1: NT_STATUS_LOGON_FAILURE
Failed to change password for test
The user is present in /usr/local/etc/samba/smbpasswd though, and I'm sure (after re-setting it several times :D) that the password is correct.

What I'm forgetting of doing wrong ? I tried to give a look to the logs, but they don't seem to enlightening
The only thing that seems out of place is that just adding
Code:
samba_enable=YES
to rc.conf wasn't enough, the rc script complained that I had to add
Code:
winbindd_enable=YES
I don't think I ever needed it before.
 
SirDice said:
Try adding the user with pdbedit(8).
Thanks for the suggestion, but in the end the solution was much simpler:
the problem was caused by the fact that I hadn't setup the hostname.
Once I did that, the authentication problem disappeared.
 
Back
Top