cant login with my samba password only with my linux password

Tom H tomh0665 at gmail.com
Sat Dec 25 18:45:13 UTC 2010


On Thu, Dec 23, 2010 at 1:07 PM, Hartmut <freemlist at googlemail.com> wrote:
> 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)?


>>>> 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 :)

"smbpasswd <user>" works for me as root so no idea except maybe doing
so as the samba admin user if you have a different one.


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

Check whether you have libpam-smbpass. Its function's to synchronize
the samba password with the unix password when you log in to a box and
they are different.

Without libpam-smbpass, I'd be more inclined to call this a bug but,
if this is the case, I'd have to read the developers' rationale first.


>>>> 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 :(

Thanks for the correction. My memory of the command was partial, your
post reminded me that it should be "echo -e "test\ntest\n" | pdbedit
-t -u <user>".

I've just tried it though and it failed so the article or post that
I'd read had more to it than that. I've tried it with debugging turned
on and it throws off errors about group maps and RIDs that I can't
look into now.

You could also look into changing the password with "net" - something
like "net rpc password..." but I can't look up the proper syntax at
the moment. I'm sorry about the incomplete help... :(




More information about the ubuntu-users mailing list