Windows nt user or group not found check the name again

Описывает возможные причины ошибок 15401 и способы устранения этой проблемы.

Microsoft SQL Server 2005 Standard Edition Microsoft SQL Server 2005 Express Edition Microsoft SQL Server 2005 Developer Edition Microsoft SQL Server 2005 Enterprise Edition Microsoft SQL Server 2005 Workgroup Edition Еще…Меньше

В ЭТОЙ ЗАДАЧЕ

  • СВОДКА

    • Имя входа не существует

    • Одинаковые идентификаторы безопасности

    • Сбой при проверке подлинности

    • Чувствительность к регистру

    • Локальные учетные записи

    • Разрешение имен

Обзор

Может появиться следующее сообщение об ошибке при добавлении пользователя Microsoft Windows NT или группы Microsoft Windows NT как имя входа Microsoft SQL Server или при перемещении имен входа с сервера в одном домене на сервере в другом домене.

Ошибка 15401: Windows NT пользователь или группа «%s» не найден. Проверьте правильность имени.

В этой статье описываются возможные причины ошибок и способы устранения этой проблемы.

Имя входа не существует

  1. Убедитесь, что имя входа Windows по-прежнему существует в домене. Администратор сети мог удалить имя входа Windows по определенным причинам, поэтому не удается предоставить доступ для входа SQL Server.

  2. Проверьте правильность написания имя домена и имя входа, и что используется следующий формат:

    DomainUser

  3. Если имя входа существует и она верна и по-прежнему получаю сообщение об ошибке, выполните приведенные ниже в этой статье.

Одинаковые идентификаторы безопасности

В домене Windows уникальные идентификаторы безопасности (SID) автоматически назначаются Логины Windows в домене. При добавлении имени входа Windows имя входа SQL Server, идентификатор хранится в системной таблице в SQL Server. 15401 ошибка возникает при попытке добавить новое имя входа, которая имеет тот же SID, что и существующее имя входа SQL Server.

Примечание. В SQL Server 2005 не допускаются повторяющиеся идентификаторы безопасности.

  1. Чтобы определить причину ошибки выполняться следующий код образца базы данных при входе в SQL Server как член роли sysadmin :

    SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomainYourLogin')

  2. Этот запрос возвращает строку, повторяющиеся SID является причиной проблемы.

  3. Одной из возможных причин этого сценария является загрузка базы данных master на сервере в другом домене. Одно из имен пользователей в этом домене могли ИД безопасности как имя входа, которое вы пытаетесь добавить в этом домене. Это может произойти в среде при наличии клонирования или ghost систем.

  4. Необходимо использовать sp_revokelogin удаление с соответствующим SID имени входа, или, для поддержания существующих имен входа правильно сопоставить имена входа из старого домена учетных записей в домене. Сведения о том, как сделать это, щелкните следующий номер статьи базы знаний Майкрософт:

    Как перемещать базы данных между компьютерами под управлением SQL Server 314546

Сбой при проверке подлинности

Если по некоторым причинам недоступен контроллер домена для домена, в которой находится имя входа (том же или другом домене), то возможно возникновение ошибки 15401.

  1. Если имя входа находится в другом домене, чем SQL Server, проверьте наличие правильного отношения доверия между доменами.

  2. Убедитесь, что контроллер домена для имени входа доступны с помощью команды ping с компьютера, на котором выполняется SQL Server. Проверьте IP-адрес и имя контроллера домена.
    Дополнительные сведения о команде ping щелкните следующий номер статьи базы знаний Майкрософт:

    Устранение неполадок подключений TCP/IP в Windows 2000 или Windows NT как 102908

Чувствительность к регистру

Наблюдаются проблемы регистра, которые описаны в следующих статьях базы знаний Майкрософт:

Сортировки имен пользователей Windows NT и последовательности Юникода case-sensitive 245768

В данном случае использование хранимой процедуры sp_configure или sp_helpsort хранимую процедуру для определения порядка сортировки или параметры сортировки экземпляра SQL Server с учетом регистра. Если сервер выполняется с учетом регистра, выполните действия в указанной статье (Q245768) для добавления имени входа.

2770837 исправление: сообщение об ошибке «Windows NT пользователь или группа «Имя_доменаимя_пользователя» не найден» при добавлении имени входа на экземпляр SQL Server 2008 с учетом регистраВ этом случае проблема возникает при попытке добавить пользователя Microsoft Windows NT или группы как имя входа в SQL Server 2008. Если сервер выполняется с учетом регистра, обратитесь к разделу «Решение» в обновлении 2770837.

Локальные учетные записи

Локальные учетные записи (недоменных) требуют специальной обработки. Если вы пытаетесь добавить локальную учетную запись на локальном компьютере, на котором выполняется SQL Server, обратитесь к следующей статье Microsoft Knowledge Base для правильных шагов:

не удается выполнить 322988 sp_grantlogin «NT AUTHORITYSYSTEM» в Microsoft Windows NT 4.0

  1. Чтобы добавить локальной системной учетной записи имени входа SQL Server в Windows NT 4.0, просмотр процедуры в статье Q322988 базы знаний Майкрософт.

  2. При добавлении встроенные локальные группы домена необходимо использовать BUILTIN.
    Для получения дополнительных сведений щелкните следующий номер статьи базы знаний Майкрософт:

    216808 BUILTINGroup используется для предоставления доступа к предварительно определенных групп Windows NT

Разрешение имен

При наличии проблем с разрешения имени компьютера, который участвует в добавление к имени входа или группе, может появиться ошибка 15401.

Убедитесь, что ваш механизм разрешения имени (например, служба WINS DNS, HOSTS или LMHOSTS) настроена правильно.

Нужна дополнительная помощь?

  • Remove From My Forums
  • Question

    • Edited by

      Friday, September 20, 2013 5:30 PM

Answers

  • Hi DevXYZ,

    Have you checked the other possible reasons for this issue?

    The login does not exist

    1. Verify that the Windows login still exists in the domain. Your network administrator may have removed the Windows login for specific reasons, and you may not be able to grant that login access
      to the SQL Server.
    2. Verify that you are spelling the domain and login name correctly and that you are using the following format:

    DomainUser

    1. If the login exists, and it is correct, and you still receive the error, continue with the following sections in this article.

    Duplicate security identifiers

    In a Windows domain, unique Security Identifiers (SIDs) are automatically assigned to Windows logins in the domain. When you add a Windows login as a SQL Server login, the SID is stored in a system table in SQL Server. If you try to add a new login which has
    the same SID as an existing SQL Server login, the 15401 error occurs.

    Authentication failure

    You might receive error 15401 when the domain controller for the domain where the login resides (the same or a different domain) is not available for some reason. 

    1. If the login is in a different domain than the SQL Server, verify that the correct trusts exist between the domains.
    2. Verify that the domain controller of the login is accessible by using the
      ping command from the computer that is running SQL Server. Check both the IP address and the name of the domain controller.

    After you tried all the possible methods list above, you still receive the same error, please check the error log as Dean Savović mentioned above and share us the detailed error message here
    as we can analysis further.

    Thanks

    Candy Zhou

    • Edited by
      Candy_Zhou
      Monday, September 23, 2013 6:14 AM
      edit
    • Proposed as answer by
      RohitGarg
      Sunday, September 29, 2013 2:33 PM
    • Marked as answer by
      Candy_Zhou
      Thursday, October 3, 2013 7:24 AM

I am trying to create users on a SQL server from an Active Directory group as an application I am working with does not natively support Windows authentication and relies upon individual logins being created on the SQL server, as application level permissions are managed in the application rather than using SQL roles. Due to this, each user that is to access the application needs their own user creating against the SQL instance that the applications database is on, so that the user can then be assigned individual permissions within the application.

I am reading the list of users from the Active Directory group we have designated using the following;

exec master..xp_logininfo 'domaingroupname', 'members'

This returns output similar to the following;

account name    type  privilege  mapped login name  permission path
DOMAINUSER     user  user       DOMAINUSER        DOMAINGROUPNAME

For the most part, the users returned in this list can be created on the SQL instance without any drama. I am creating the users as SQL accounts using sp_grantlogin in the first instance, before moving on to allow each new login access to the application database. However, a handful of users are being reported as not existing. I get the following error as a result of running sp_grantlogin;

Msg 15401, Level 11, State 1, Procedure sp_grantlogin, Line 49
Windows NT user or group 'DOMAINUSER' not found. Check the name again.

Obviously in the above error message, I have removed the actual username. Why would xp_logininfo return a user that cannot be created with sp_grantlogin? Is there anything obvious that I am missing?

asked Feb 26, 2013 at 12:52

2

This just means that the user is not in the Administrator group. If your problem is like mine where your Active Directory in on a different Virtual Machine, and your SQL Server on another. And you have joined Active Directory Domain to your SQL Server Virtual Machine, then you have to do the following on your SQL Server Virtual MAchine.

  1. Navigate to Tools —> Computer Management.

  2. The windows opens, Expand System Tools —> Local Users and Groups.

  3. Click on Groups and you should see a list of groups to the right
    column of the window.

  4. Double click Administrator, a new window opens and you will notice that the linked User is not under there.

  5. Click Add, new window opens. Here, under location, you may chose to change
    location of your domain.

  6. Click Advanced, a log in prompt opens, simply log in with you administrator Virtual Machine account.

  7. Click Find Now with all fields as is. From a list of users presented, double click the user imported from Active Directory and click Ok.

answered Jun 16, 2014 at 3:20

Komengem's user avatar

KomengemKomengem

3,6327 gold badges32 silver badges56 bronze badges

Do you change the case of the login name before using sp_grantlogin?

If you have a case sensitive server collation, then the case of the AD user nneds to be specified in exactly the right case.

You can find the server collation by doing:

select serverproperty('collation')

If you do have a case sensitive server collation, and you don’t mess with the case, there is probably a mismatch with what xp_logininfo is returning and the actual case in AD. In which case, try creating the user with variations on the case.

If none of this applies, look into the account. Is it disabled, can you log in with it, etc.. If suser_sid() returns null, then there must be some kind of problem with it.

answered Feb 26, 2013 at 15:17

muhmud's user avatar

muhmudmuhmud

4,4442 gold badges15 silver badges21 bronze badges

3

I can give you my advice from doing this in Windows 7 although it may not be relevant.

The problem I had was that I had renamed the user account in the Windows UI. The name appeared correctly in Windows, and I used the new name to log on. But behind the scenes it was still using the old name which was what SQL Server was looking for.

I struggled with this for HOURS before I finally worked it out!!

answered Nov 2, 2013 at 20:32

Remotec's user avatar

RemotecRemotec

10k23 gold badges105 silver badges146 bronze badges

I have also faced this error for users, who was:

  1. created in AD
  2. granted some SQL permissions
  3. renamed in AD

Then I try to add this new, renamed user account name to the same server/database, error Msg 15401, Level 11, State 1, Procedure sp_grantlogin, Line 49 appears.

I have followed steps in http://support.microsoft.com/kb/324321/en-us and this command returned old user account name befor rename:

SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomainYourLogin')

it returned
YourDomainOldLogin

after executing
exec sp_revokelogin ‘YourDomainOldLogin’

problem was fixed, sp_grantlogin now works ok.

PS as another test method I suggest running sp_grantlogin remotely, from another server. It may succeed to.

Jhanvi's user avatar

Jhanvi

4,9898 gold badges32 silver badges41 bronze badges

answered Jun 20, 2014 at 10:07

bazanovv's user avatar

I had a very similar case, the same error code 15401, but in this case what I was doing was adding users from the Domain, into a group in the server where I had SQL; so then just add the group to SQL engine with the same ROLE.

USE [master]
GO
CREATE LOGIN [localhostAdministrators] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
Msg 15401, Level 16, State 1, Line 3
Windows NT user or group 'localhostAdministrators' not found. Check the name again.

Then in the link PRB: Use BUILTINGroup to Grant Access to Predefined Windows NT Groups

I found the issue, so the solution was:

USE [master]
GO
CREATE LOGIN [BUILTINAdministrators] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
ALTER SERVER ROLE [sysadmin] ADD MEMBER [BUILTINAdministrators]
GO
Command(s) completed successfully.

I believe this is great to diminish the number of login accounts, and have a more manageable number of users assigned to the roles in the SQL server.

answered Aug 14, 2016 at 4:23

Jose Pla's user avatar

Jose PlaJose Pla

1001 silver badge9 bronze badges

If you’re using a non-English language, or have been using one on your machine, you might have to localize the user details you’re trying to use.

E.g. [NT AUTHORITYNetwork Service] on a Swedish machine is [NT INSTANSNätverkstjänst].

Spent hours trying to figure out why BUILTIN, NT AUTHORITY, <MachineName> etc. didn’t work.

answered Aug 10, 2017 at 11:39

Mikael Dúi Bolinder's user avatar

1

My issue was the length of the login. In DomainUser syntax, Windows uses the so called pre-Windows 2000 syntax. That syntax limits the length of the username to 20 characters. You have to truncate the username to the first 20 characters and then it should work, like so:

DomainAbcdefghijklmnopqrstuvwxyz

Becomes

DomainAbcdefghijklmnopqrst

answered Jun 20, 2019 at 16:11

Mr. TA's user avatar

Mr. TAMr. TA

5,17027 silver badges35 bronze badges

MS SQL Server. При создании логина генерируется
ошибка

При создании пользователя сервере (что из Enterprise Manager,
что из Query Analizer) командой

exec sp_grantlogin 'OurDomainMalinkin'

вылезает ошибка:

Server: Msg 15401, Level 11, State 1, Procedure sp_grantlogin, Line 41
Windows NT user or group 'OurDomainMalinkin' not found. Check the name again.

Ошибка, прямо скажем, непонятная. В списке логинов
сервера пользователя OurDomainMalinkin нет, пользователь
такой в Active Directory есть, а сервер возвращает ошибку, что
такой пользователь имеется. В чем причина? Оказалось,
что пользователь OurDomainMalinkin в домене раньше именовался
по-другому и был уже зарегистрирован на сервере. Стало
немного яснее, но как же генерировать пользователя так,
чтобы не появлялась ошибка?

Для этого перед генерацией пользователя следует
проверить, не зарегистрирован ли он уже на сервере:

if not exists(
  select
    1
  from
    master.dbo.syslogins
  where
    sid = suser_sid('OurDomainMalinkin'))
exec sp_grantlogin 'OurDomainMalinkin'

Теперь дам пояснения. Пользователь Windows имеет
уникальный идентификатор, которым является вовсе не
имя, а SID. Именно по SID происходит различение
пользователей при Windows-аутентификации. Потому и
проверять существование пользователя на сервере
нужно не по имени, а по его SID. Еще один интересный
момент: при выдаче прав пользователю на базу
использовать нужно уже его действительное имя, а не то,
которое прописано на сервере. То есть, если вы даете
права на базу пользователю OurDomainMalinkin, которого раньше
звали OurDomainMalina, то в процедуру sp_grantdbaccess передавать
нужно OurDomainMalinkin, несмотря на то, что прописано в
таблице syslogins:

exec sp_grantdbaccess 'OurDomainMalinkin', 'Malinkin'

Хотя запрос

select
  *
from
  master.dbo.syslogins
where
  name = 'OurDomainMalinkin'

возвращает пустую выборку. Так происходит на MS SQL Server
2000. В версии 2005 запрос на выдачу прав срабатывает в
обоих случаях.

Сказать честно, мне все равно непонятно, почему в
такой ситуации генерируется такое ни о чем не
говорящее исключение, разработчики из Microsoft просто
поленились, в системной процедуре sp_MSaddlogin_implicit_ntlogin для
любой ситуации, когда генерация невозможна,
исключение одинаковое.

Having an issue creating accounts in SQL.

There are KB articles for the issue: http://support.microsoft.com/kb/324321/en-us http://support.microsoft.com/kb/2770837

Except these don’t exactly apply. This issue typically arises when you have a CS instance. I have confirmed the collation as CI:

select serverproperty('collation')  
SQL_Latin1_General_CP1_CI_AS  

SQL Ver is 10.50.400 (2008 R2 SP2)

So when I try to create a login from windows it just tells me :

Msg 15401, Level 16, State 1, Line 1 Windows NT user or group ‘domainaccount’ not found. Check the name again.

So here is the kicker. The SQL Server is hanging off a RODC. It has no direct communication with a RWDC. That may be important, not sure. The real kicker is that if I authenticate to the server with an account, that account is then good.

So if I try to add login for domainuserA, I get 15401. Then, I log into the SQL Server as domainuserA. I run the T-SQL again, and it works.

If I run:

select SUSER_SID ('domainuserb')

I get a NULL return. Until I log into the server as domainuserb. Then I get the SID back.

Wondering if anyone else has experienced this strange issue, or has any suggestions as to how I might solve it.

When you add new Domain Login to SQL Server, you may see error  Windows NT user or group ‘DomainUser’ not found. Check the name again. (Microsoft SQL Server, Error: 15401).

This error message is very general and it does not explain any specific problem or reason itself. Microsoft has a very good article to fix this issue at http://support.microsoft.com/kb/324321/en-us.

However, there is another scenario which is not covered in above article (at the time when writing this article) or may be I am the first person who faced this issue.

This scenario can be reproduced on Windows 2008 Server with SQL 2008 Server where the Domain Controller is Windows 2000 server. On Windows 2008 server, 2 new policies have been enabled by default that encrypts the secure channel data when new LOGIN request is sent to Domain Controller by Domain member(Also SQL Server). In this scenario, Domain Controller is Windows 2000, thus it does not understand the encrypted request thus refuses the LOGINrequest. All you need to do is to fix this behavior in Windows 2008 (SQL Server) to not to send encrypted secure channel data to Domain Controller. To do this follow the steps below and it should fix the issue.

  1. From the SQL Server running Windows 2008 R2, Click Start-> Run and type the command GPEDIT.MSC. This will open the Policy Editor.
  2. From Policy Editor Expand “Computer configuration” — > Windows Settings -> Security Setttings -> Local Policies -> Security Options.
  3. You will see all security policies on right hand side window. Make changes into the following two policies.
    • Domain member: Digitally encrypt secure channel data (when possible) – Disable this policy
    • Domain member: Digitally sign secure channel data (when possible) – Disable this policy

After making these changes, close the policy editor and reboot the box. (Not SQL Server, but restart entire system).

In case your local policy does not allow you to make changes, you may have to make changes using Group Policy Management Console. Instructions to install GPMC are located at http://blogs.technet.com/askds/archive/2008/07/07/installing-gpmc-on-windows-server-2008-and-windows-vista-service-pack-1.aspx.

  • Run gpmc.msc (Group Policy Management)
  • Expand your Domain
  • Go to and select and then follow steps 2 and 3 from above.

Posted by Sudarshan Narasimhan on October 17, 2012

I was working on a customer scenario on my Virtual machine recently. I have a Windows 2008 Domain controller and a another member server that runs my SQL 2008 instance (all VM’s running on Hyper-V). When I tried to create a new Windows login from SSMS, I got this well-known error 15401

image

Error Text
Msg 15401, Level 11, State 1
Windows NT user or group ‘DOMAINusername’ not found. Check the name again.

There is already a KB article that talks about some of the known scenarios when you could get Error 15401 in SQL Server. None of these matched my scenario.

How to troubleshoot error 15401
http://support.microsoft.com/kb/324321/en-us


Since these are Virtual Machines running on Hyper-V, I had made sure when I created the VM’s that none of the machine SID’s are duplicates. I had used newSID.exe to ensure that each client machine joined to my DC had a unique machine SID.

Since I was not able to add a new login, I used xp_logininfo to see if I can retrieve

Msg 15404, Level 16, State 11, Procedure xp_logininfo, Line 62
Could not obtain information about Windows NT group/user ‘MyDomainNewUser’, error code 0x6fd.

Pay attention to the Windows Error Code 0x6fd that was returned by xp_logininfo.

0x6fd (hex) translates to Win32 error 1789 –> The trust relationship between this workstation and the primary domain failed.

Now, I have only 1 Domain Controller so there are no cross-domain trusts I need to setup etc. If that is your scenario, you might want to check what the trust level between your different domains are. Anyways, in my case that did not apply. So what could be the issue here?

My SQL Server service account was running under a domain account. This account is what SQL Server uses to query AD and retrieve account info when creating a new login. If your SQL Server is running on Windows 7/2008 R2, there is a hotfix that might fix this issue for you –> http://support.microsoft.com/kb/976494

To resolve this issue I followed these steps. Please note that this worked for me and might not work for your scenario. I am posting this out just as an FYI in case it helps anyone else encountering a similar scenario.

1. Login to the SQL Server machine and open a command prompt with elevated credentials (Run-As Administrator).

2. Run the following command which will reset the password for the machine account

netdom resetpwd /server:<DomainControllerName> /userd:<domaindomainadminuser> /passwordd:<password>
E.g. netdom resetpwd /server:CONTOSO-DC /userd:CONTOSOadministrator /passwordd:MyDCPassw0rd

Expected output: The machine account password for the local machine has been successfully reset.

3. Restart the Netlogon service on the SQL Server machine.

4. Clear the Kerberos tickets on the SQL Server machine from command prompt

klist purge

Excepted output: Deleting all tickets: Ticket(s) purged!

5. After this was done, I re-ran the xp_logininfo ‘contosonewlogin’ and this time it completed and did not give error 15401. [I did not restart my SQL Server service]

6. Now, I was able to add the login from SSMS or using CREATE LOGIN.

A key point here is step #2, the netdom command needs to be run from the machine whose machine account password you want to reset. To reset a machine account password, you need someone with domain admin credentials. So you need a Domain admin credentials as this is required for netdom.exe. In our scenario, the machine has to be the SQL server machine. More information about what netdom.exe does is available in this KB article –> http://support.microsoft.com/kb/325850

HTH.


Regards,
TheSQLDude

This entry was posted on October 17, 2012 at 1:55 AM and is filed under Security, Windows.
Tagged: create login, DNS, error creating login, lookupaccountname, Msg 15401, SID, SQL Server, trust relationship. You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.

Понравилась статья? Поделить с друзьями:
  • Windows nt server это операционная система предназначенная для
  • Windows nt driver must be loaded что делать
  • Windows nt driver is required что делать
  • Windows nt driver is required при запуске программы
  • Windows nt driver is required winrik