cant login with my samba password only with my linux password

Tom H tomh0665 at gmail.com
Thu Dec 23 17:38:29 UTC 2010


On Thu, Dec 23, 2010 at 12:03 PM, Hartmut <freemlist at googlemail.com> wrote:
> On Thu, Dec 23, 2010 at 5:38 PM, Tom H <tomh0665 at gmail.com> wrote:
>> On Thu, Dec 23, 2010 at 8:57 AM, Hartmut <freemlist at googlemail.com> wrote:
>>>
>>> I have a strange problem with my samba server. When I try to connect
>>> with my (Windows)client and samba ask for the password, it's only
>>> accepting my linux-user password, not my samba-user password (set with
>>> smbpasswd).
>>>
>>> And now the strange about it. When i change my sambapassword with
>>> smbpasswd, and try to login from my client, then the samba-user password
>>> is accepted. But after a reboot of my samba server, the server accepts
>>> only the linux-user password. I have to (re)set the samba-user password
>>> again with smbpasswd and only after that, I can login with the
>>> samba-user password.
>>>
>>> Is there something wrong with my smb.conf (see below)?
>>>
>>> [global]
>>>        security = user
>>>        encrypt passwords = true
>>>        passdb backend = tdbsam
>>>        obey pam restrictions = yes
>>>        unix password sync = no
>>>        pam password change = no
>
> thank you for your hint.

You're welcome.


>> 1. When you run smbpasswd as a user, the password is passed to a
>> running smbd because smbpasswd isn't setuid root and the samba
>> password db isn't updated.
>
> I tried it as user and as root, both the same result.

As root, did you run "smbpasswd" or "smbpasswd <user>"? Because
running smbpasswd as root should update the samba password db.

Check "pdbedit -Lv <user>" or "ls -l /var/lib/samba/passdb.tdb" before
and after running "smbpasswd <user>" as root.


>> 2. If you have a valid unix username and password and an enabled smb
>> username with a diffferent password, you can connect to a samba share
>> with your unix password.
>
> The connect with the unix password works, but i like to connect with
> my samba password.

I'm pretty sure that it's a (weird) samba feature but not 100% sure.
But it does explain the behavior of your box.


>> B. If you don;t want to do A above, why not change the samba
>> password(s) with pdbedit?
>
> How can i do that with pdbedit? I know that tool, but i don't know how
> to change the password with pdbedit. What's the right parameter for
> that? Haven't found that at the man page.

No time for "man pdbedit" but I think that it's "pdbedit -t -u <user>".




More information about the ubuntu-users mailing list