Logonuserw Returns Error 1385
Contents |
Escalation Services team. Troubleshooting xp_cmdshell failures ★★★★★★★★★★★★★★★ psssqlApril 10, 20082 Share 0 0 This post assumes you have properly enabled the xp_cmdshell feature using the Surface Area Configuration a call to 'logonuserw' failed with error code: '1330' tool and you have used Management Studio | Server Properties | Security to establish xp_cmdshell error code 1326 a proxy for xp_cmdshell execution. Sample command: master..xp_cmdshell ‘whoami' SQL Authentication: TestLogin (Public in pubs) When xp_cmdshell is executed it a call to logonuserw failed with error code 1329 returns initialization errors with error message 15121. Msg 15121, Level 16, State 200, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to ‘API‘ failed with error code: ‘OS ERROR xp_cmdshell 1326 CODE‘. Use the API and OS ERROR CODE to troubleshoot problems. The API and OS ERROR CODEs can be looked up on MSDN. You can also use ‘net helpmsg ####' to retrieve the text of the OS ERROR CODE. Bad Password (Server Properties | Security | Proxy does not validate password) If password is changed outside of Management Studio (Computer Management) so it is not in sync with SQL.
An Error Occurred During The Execution Of Xp_cmdshell. A Call To 'createprocess' Failed
If user was dropped and recreated from the system (Computer Management) so it has a SID change. Msg 15121, Level 16, State 200, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to ‘LogonUserW' failed with error code: ‘1326‘. 1326 = Logon failure: unknown user name or bad password. User does not have login as BATCH rights (Local Security Policy | User Rights Assignement | Logon As A Batch Job) Msg 15121, Level 16, State 200, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to ‘LogonUserW' failed with error code: ‘1385'. 1385 = Logon failure: the user has not been granted the requested logon type at this computer. Note: Drop the ‘W' when searching LoginUser not LoginUserW for the unicode versus ascii version LoginUserA Success master..xp_cmdshell ‘whoami' output ----------- dorrdelltestuser Note: When it is called by a user that is not a member of the sysadmin fixed server role, xp_cmdshell connects to Windows by using the account name and password stored in the credential named ##xp_cmdshell_proxy_account##. If this proxy credential does not exist, xp_cmdshell will fail. Bob Dorr SQL Server Senior Escalation Engineer
Tags SQLAgent Tools Comments (2) Cancel reply Name * Email *execution of xp_cmdshell. A call to 'LogonUserW' failed with error code: '1385' Observations : 1, The login
Proxy Account For Xp_cmdshell
which is trying to run xp_cmdshell has EXEC permission on the strored ##xp_cmdshell_proxy_account## procedure xp_cmdshell 2, when we grant the login with sysadmin privilege , the login can run xp_cmdshell without msg 15121 level 16 state 200 any issues. however when sysadmin permission is revoked , the login faces belwo error message while using xp_cmdshell "a call to LogonUserW failed with error code 1385" steps for Fixing https://blogs.msdn.microsoft.com/psssql/2008/04/10/troubleshooting-xp_cmdshell-failures/ the issue : 1, open local security policy on the computer which has SQL server installed on it. ex: if login was trying to connect to serverA and run the query xp_cmdshell , which resulted in error message. then connect to serverA and open local security Policy. 2, Navigate to Security Settings > Local policies > User rights assignment 3, Double http://mssqlissue.blogspot.com/2015/04/fix-error-call-to-logonuserw-failed.html click on policy 'Log on as a batch job' Add user or group which needs to run xp_cmdshell command in sql . apply the settings performing above steps in my case solved the issue Posted by Abhimanyu Singh at 21:47 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest 1 comment: xhio21 July 2016 at 08:24Why the button add user or group is disabled and there's a messaje "This setting is not compatible with configuration running 2000 service pack 1" ?? how can i enable it?ReplyDeleteAdd commentLoad more... Newer Post Older Post Home Subscribe to: Post Comments (Atom) About Me Abhimanyu Singh I have around 10 years of experience in SQL server which involves troubleshooting sql issues and improve sql performance View my complete profile Blog Archive ► 2016 (1) ► January (1) ▼ 2015 (11) ► October (2) ▼ April (9) automation for listing deadlocks in sql server SQL Configuration Manager WMI issue automating rebuild or reorg index on specific larg... unable to shrink log file of database in SQL serve... list long running queries in sql server throug
up Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home » SQL Server 2008 » Security (SS2K8) » A call to ‘LogonUserW’ failed with error code... 21 http://www.sqlservercentral.com/Forums/Topic1733767-1526-1.aspx posts,Page 1 of 3123»»» A call to ‘LogonUserW’ failed with error code : ‘1385’ Rate Topic Display Mode Topic Options Author Message Brandie TarvinBrandie Tarvin Posted Wednesday, November 4, 2015 11:25 AM SSCertifiable Group: General Forum Members Last Login: Yesterday @ 11:07 AM Points: 7,417, Visits: 8,561 I'm pulling data from a NAS share and have recently run into the following error.An error occurred during the execution of xp_cmdshell. A call to ‘LogonUserW’ failed with error code a call : ‘1385’. The domain on several of our logins changed from XYZ to ABC. Now we've been able to keep the SIDS (or so I've been told) on most of them. But we've had the occasional issue. This may or may not be one of them. Right now, I have a request in to our server team to check the current permissions on the share for the login in question. In the meantime, as I'm looking into a call to this, I ran into an article about the problem not necessarily being about permissions but logon types. What logon types (rights) would I need for xp_cmdshell to read and execute a directory on a NAS Share? Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle. Post #1733767 Ed WagnerEd Wagner Posted Wednesday, November 4, 2015 12:24 PM SSCrazy Eights Group: General Forum Members Last Login: Yesterday @ 7:35 PM Points: 9,592, Visits: 8,994 Brandie Tarvin (11/4/2015)I'm pulling data from a NAS share and have recently run into the following error.An error occurred during the execution of xp_cmdshell. A call to ‘LogonUserW’ failed with error code : ‘1385’. The domain on several of our logins changed from XYZ to ABC. Now we've been able to keep the SIDS (or so I've been told) on most of them. But we've had the occasional issue. This may or may not be one of them. Right now, I have a request in to our server team to check the current permissions on the share for the login in question. In the meantime, as I'm looking into this, I ran into an article about the problem not necessarily being about permissions but logon types. What logon types (rights) would I need for xp