[Samba] mssql, problem authenticating from stored procedure...

Felipe Augusto van de Wiel felipe at paranacidade.org.br
Tue Oct 3 14:52:27 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 10/02/2006 02:10 PM, Kristoffer Egefelt escreveu:
> Hi Felipe,
>>      Any chances that your password contains special characters
>> that are not properly quoted inside SQL?
> 
> Nope, no special characters, and the user is created on the local win2k3
> server, so the stored procedure is just connecting like this
> 
> \\192.168.0.1\share1\backup\etc
> 
> Which works when logged in as sqlserver user and manually connecting, but
> not with the msSQL agent, which runs as the sqlserver user... :(
> 
> This must be something with the way the sql server presents itself /
> logs in
> to the samba server...
> 
> I've attached auth:10 logs of a succesfull manual connection and a failed
> connection attempt from the stored procedure...

	Checking the logs, I found out this:

In the working session:

  [2006/10/02 16:58:06, 4] libsmb/ntlm_check.c:ntlm_password_check(326)
    ntlm_password_check: Checking NT MD4 password
  [2006/10/02 16:58:06, 4] auth/auth_sam.c:sam_account_ok(138)
    sam_account_ok: Checking SMB password for user sqlserver
  [2006/10/02 16:58:06, 5] auth/auth_sam.c:logon_hours_ok(120)
    logon_hours_ok: user sqlserver allowed to logon at this time (Mon Oct  2 16:
    )
  [2006/10/02 16:58:06, 5] auth/auth_util.c:make_server_info_sam(625)
    make_server_info_sam: made server info for user sqlserver -> sqlserver

In the not_working session:
    check_ntlm_password: guest had nothing to say
  [2006/10/02 17:04:34, 4] libsmb/ntlm_check.c:ntlm_password_check(326)
    ntlm_password_check: Checking NT MD4 password
  [2006/10/02 17:04:34, 3] libsmb/ntlm_check.c:ntlm_password_check(344)
    ntlm_password_check: NT MD4 password check failed for user sqlserver
  [2006/10/02 17:04:34, 5] auth/auth.c:check_ntlm_password(273)
    check_ntlm_password: sam authentication for user [sqlserver] FAILED with err
  [2006/10/02 17:04:34, 2] auth/auth.c:check_ntlm_password(319)
    check_ntlm_password:  Authentication for user [sqlserver] -> [sqlserver] FAI
  [2006/10/02 17:04:34, 5] auth/auth_util.c:free_user_info(1866)


	Do you see the difference after checking the NT MD4 password?
The first one is using auth_sam, the second one is using ntlm. I'm
not 100% sure but it is realted with the auth method, Samba should
deal with this, perhaps you will need an extra parameter in your
smb.conf (man smb.conf) or perhaps you could check your client to
force another auth method.


> Thanks...
> /Kristoffer

	Kind regards,

- --
Felipe Augusto van de Wiel <felipe at paranacidade.org.br>
Coordenadoria de Tecnologia da Informação (CTI) - SEDU/PARANACIDADE
http://www.paranacidade.org.br/           Phone: (+55 41 3350 3300)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFFInkICj65ZxU4gPQRAtCHAJ9HM/XqnPz581TbxjunIdDRl+AVUgCgifaz
e4Zk14wv/c06Nkt6ubU8Wkg=
=m9cK
-----END PGP SIGNATURE-----


More information about the samba mailing list