Showing posts with label computername. Show all posts
Showing posts with label computername. Show all posts

Wednesday, March 28, 2012

Login failed for user Domainname\computername

Hi,

I am using SQL Server 2005. The below message is added to the Application Event Viewer frequently.

Failure Audit: Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

abc is my domain name and xyz is my computer name.

When I look @. the SQL error logs, I find the following message:

Error 18456 Severity 14 state 11

Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

Please let me know if you have any suggessions.

Thanks

Santhosh

It seems like a service running in the computer xyz is trying to connect to your SQL Server instance. This service must likely is running with local system or network service credentials.

I would recommend investigating what is this service by verifying the services installed in machine xyz; and if indeed it is a service that should be connecting to that SQL Server instance, you can grant access by creating a login for the Windows user [abc\xyz$] and then grant proper permissions.

I hope this information helps. Let us know if you have any further questions.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||But, xyz$ is a computer account. How can I create a login for Computer Account in SQL? Is this possible?|||

CREATE LOGIN [abc\xyz$] FROM WINDOWS

It should work, let us know if it worked.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Hi Raul,

I created the login using the above mentioned command. It created find.

But, now I get two messages in event viewer.

One is success audit where is says login successful for user abc\xyz$.

immeditely, it also logs in the below failure message.

Failure Audit: Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

In the earlier posts, you had mentioned about granting permissions to abc\xyz$ account?

What permissions should we grant.

Can you also help me with the syntax to grant those permissions.

Thanks

Santhosh

|||

Creating the loginshould typically be enough to connect to the system (using master DB).I would recommend using SLQ Server Profiler and check the Security Events section (mark show all events to see all possibilities), to be more specific mark everything under Audit Login & Audit logout

I hope this helps,

-Raul Garcia

SDE/T

SQL Server Engine

|||

We created a login for the computer account name in SQL Server.
From SQL Server, we ran
CREATE LOGIN [Domainname\computername$] FROM WINDOWS
The login created successfully.
Now, we see two audit messages for Domainname\Computername$.
First audit message is..

Login Succeded for user Domainname\Computername$. Connection Trusted.(Client :xx.xx.xx.xx)
Second Audit message is.. Login failed for user Domainname\Computername$. (Client :xx.xx.xx.xx)

Before creating the login, we had only login failed message. But, now we get login succeded message and login failed message for the same username.

Any thoughts would be helpful.

Thanks

Santhosh

|||

Unfortunately I really have no idea on what may be happening. I would suggest trying to enable other events, including any permission checks or any queries being started. Hopefully this extra information will give us a clue on why the connection is failing.

-Raul Garcia

SDE/T

SQL Server Engine

Login failed for user Domainname\computername

Hi,

I am using SQL Server 2005. The below message is added to the Application Event Viewer frequently.

Failure Audit: Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

abc is my domain name and xyz is my computer name.

When I look @. the SQL error logs, I find the following message:

Error 18456 Severity 14 state 11

Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

Please let me know if you have any suggessions.

Thanks

Santhosh

It seems like a service running in the computer xyz is trying to connect to your SQL Server instance. This service must likely is running with local system or network service credentials.

I would recommend investigating what is this service by verifying the services installed in machine xyz; and if indeed it is a service that should be connecting to that SQL Server instance, you can grant access by creating a login for the Windows user [abc\xyz$] and then grant proper permissions.

I hope this information helps. Let us know if you have any further questions.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||But, xyz$ is a computer account. How can I create a login for Computer Account in SQL? Is this possible?|||

CREATE LOGIN [abc\xyz$] FROM WINDOWS

It should work, let us know if it worked.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Hi Raul,

I created the login using the above mentioned command. It created find.

But, now I get two messages in event viewer.

One is success audit where is says login successful for user abc\xyz$.

immeditely, it also logs in the below failure message.

Failure Audit: Login failed for user "abc\xyz$". (Client: xx.xx.xx.xx)

In the earlier posts, you had mentioned about granting permissions to abc\xyz$ account?

What permissions should we grant.

Can you also help me with the syntax to grant those permissions.

Thanks

Santhosh

|||

Creating the loginshould typically be enough to connect to the system (using master DB).I would recommend using SLQ Server Profiler and check the Security Events section (mark show all events to see all possibilities), to be more specific mark everything under Audit Login & Audit logout

I hope this helps,

-Raul Garcia

SDE/T

SQL Server Engine

|||

We created a login for the computer account name in SQL Server.
From SQL Server, we ran
CREATE LOGIN [Domainname\computername$] FROM WINDOWS
The login created successfully.
Now, we see two audit messages for Domainname\Computername$.
First audit message is..

Login Succeded for user Domainname\Computername$. Connection Trusted.(Client :xx.xx.xx.xx)
Second Audit message is.. Login failed for user Domainname\Computername$. (Client :xx.xx.xx.xx)

Before creating the login, we had only login failed message. But, now we get login succeded message and login failed message for the same username.

Any thoughts would be helpful.

Thanks

Santhosh

|||

Unfortunately I really have no idea on what may be happening. I would suggest trying to enable other events, including any permission checks or any queries being started. Hopefully this extra information will give us a clue on why the connection is failing.

-Raul Garcia

SDE/T

SQL Server Engine

Login failed for user computername\ASPNET

Hi all,
I get the error message Login failed for user 'computername\ASPNET'
when trying to log to MSDE 2000 SP 3 with .NET application.
My computer is Windows 2000 + SP4 with latest security patches.
I have tried to set the permissions to the database I am connecting
(mydatabase) with script:
sp_grantlogin 'mycomputer\ASPNET'
go
use mydatabase
go
sp_grantdbaccess 'mycomputer\ASPNET'
go
sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
go
Still the error comes.
Does anybody have ideas what to try next.
PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
Regards
Jarmo
Hi,
Did you logged into your machine using 'mycomputer\ASPNET' ? If not login to
the machine using 'mycomputer\ASPNET' and try
connecting using OSQL and confirm.
Thanks
Hari
MCDBA
"jarmopy" <jarmo.pyorny@.luukku.com> wrote in message
news:5d70b654.0408152138.6ca4d0d8@.posting.google.c om...
> Hi all,
> I get the error message Login failed for user 'computername\ASPNET'
> when trying to log to MSDE 2000 SP 3 with .NET application.
> My computer is Windows 2000 + SP4 with latest security patches.
> I have tried to set the permissions to the database I am connecting
> (mydatabase) with script:
>
> sp_grantlogin 'mycomputer\ASPNET'
> go
> use mydatabase
> go
> sp_grantdbaccess 'mycomputer\ASPNET'
> go
> sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
> go
> Still the error comes.
> Does anybody have ideas what to try next.
> PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
> Regards
> Jarmo
|||Hi Hari,
Local policy does not allow to log in as aspnet:
"The local policy of this system does not permit you to logon interactively."
It is only permitted to log on as a batch job.
Regards
Jarmo
"Hari Prasad" wrote:

> Hi,
> Did you logged into your machine using 'mycomputer\ASPNET' ? If not login to
> the machine using 'mycomputer\ASPNET' and try
> connecting using OSQL and confirm.
> Thanks
> Hari
> MCDBA
>
|||Hi again,
I changed the policy to be able to log in.
When giving the command as mycomputer\aspnet user
osql -E -S mycomputer\myinstance
I get the same error message:
Login failed.
Regards
Jarmo
|||There is no need to log in as ASPNET account
Go to MSDN site and look in SQL SERVER 2000 SDK Documentation (it is valid
for MSDE)
There is explanation how to use ASP .NET applications with SQL Server
"jarmopy" <jarmo.pyorny@.luukku.com> wrote in message
news:5d70b654.0408152138.6ca4d0d8@.posting.google.c om...
> Hi all,
> I get the error message Login failed for user 'computername\ASPNET'
> when trying to log to MSDE 2000 SP 3 with .NET application.
> My computer is Windows 2000 + SP4 with latest security patches.
> I have tried to set the permissions to the database I am connecting
> (mydatabase) with script:
>
> sp_grantlogin 'mycomputer\ASPNET'
> go
> use mydatabase
> go
> sp_grantdbaccess 'mycomputer\ASPNET'
> go
> sp_addrolemember 'db_owner', 'mycomputer\ASPNET'
> go
> Still the error comes.
> Does anybody have ideas what to try next.
> PS. Software reinstall has been tried (.NET framework 1.1, MSDE).
> Regards
> Jarmo
|||Hi,
thanks for the answers.
This seems to be a problem only in one computer.
In other machines this is working OK.