Mark Hellman
2004-Jul-22 12:00 UTC
[Samba] /etc/samba/smbpasswd keeps changing - pulling my hair out
This is really bizarre. Running Samba 3.0.4 on SuSE 9.1. The password backend is smbpasswd. Each user has a system and samba account and everything has worked as expected until recently. But now, every new user I create is unable to log into Samba server (older users are still able to log in). Inspecting log.smbd the following messages are displayed: [2004/07/22 11:44:56, 2] smbd/sesssetup.c:setup_new_vc_session(602) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2004/07/22 11:44:56, 2] smbd/sesssetup.c:setup_new_vc_session(602) setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources. [2004/07/22 11:44:56, 2] auth/auth.c:check_ntlm_password(312) check_ntlm_password: Authentication for user [seara] -> [seara] FAILED with error NT_STATUS_NO_SUCH_USER [2004/07/22 11:45:04, 2] auth/auth.c:check_ntlm_password(312) check_ntlm_password: Authentication for user [andreiaferreira] -> [andreiaferreira] FAILED with error NT_STATUS_WRONG_PASSWORD [2004/07/22 11:45:07, 2] smbd/server.c:exit_server(568) Closing connections But what is most bizarre is that the /etc/samba/smbpasswd entry for this user is modified after this logon attempt! The password field is all XXed: andreiaferreira:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [U ]:LTC-36635F00: If I reset the password by running smbpasswd -a andreiaferreira, the entry becomes: andreiaferreira:1001:58DF4B83F19C0B91AAD3B435B51404EE:050B689D4906009845CE4D4E17AA6AF7 [U ]:LTC-36635F00: BUT the next time this user tries to log into the server she is denied and the password entry is again XXed: andreiaferreira:1001:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [U ]:LTC-36635F00: I even tried to chmod a-w /etc/samba/smb.conf just to see what happened. But it was still modified! This happens using Windows XP Home and also using smbclient from a Linux host. What is going on here?! Why the NT_STATUS_WRONG_PASSWORD when the password is correct? How the hell the password in smbpasswd can be XXed by Samba after a logon attempt? The [global] section of my smb.conf is as follows: [global] workgroup = SEARA-LX log level = 2 syslog = 0 preferred master = Yes domain master = Yes wins support = Yes I would be grateful if anyone can enlighten me on this. Mark
Mark Hellman
2004-Jul-22 16:22 UTC
[Samba] Re: /etc/samba/smbpasswd keeps changing - pulling my hair out
Solved the problem. Apparently it has nothing to do with Samba, but with the CGI script ChangePassword (http://changepassword.sourceforge.net) which used the string "LTC" instead of "LCT" in smbpasswd entries. I edited the affected smbpasswd entries and changed LTC to LCT, and now it works. Mark