cant login with my samba password only with my linux password
Hartmut
freemlist at googlemail.com
Thu Dec 23 18:07:01 UTC 2010
On Thu, Dec 23, 2010 at 6:38 PM, Tom H <tomh0665 at gmail.com> wrote:
> 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.
As root i changed it with smbpasswd <user>. (and as user only with
smbpasswd). And yes, i tried both :)
> Check "pdbedit -Lv <user>" or "ls -l /var/lib/samba/passdb.tdb" before
> and after running "smbpasswd <user>" as root.
Did this. The timestamp of the file passdb.tdb and the entry "Password
last set" changes to the actual time/date.
What I wonder that
Last bad password : 0
Bad password count : 0
is not changing. Also I enter a totally wrong password, it's not
changing anymore. And, after a successful login with the linux (or
fresh changed samba) password, the field
Logon time: 0
is also not changed.
>
>>> 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.
Yes, let it call us a "feature", not a "bug" :D
>
>>> 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>".
>
I tried this, but then I'm not asked to enter a password. And a
echo "test" | pdbedit -t -u hartmut
does also not work for me, too :(
More information about the ubuntu-users
mailing list