Errore 401.1 su IIS - Unauthorized: Logon failed

IIS anonymous user setting Ovvero come resettare la password dell’utente anonimo di IIS (Internet Information Service). Può infatti succedere nella vita che aprendo la solita pagina web del proprio server Windows su cui magari girano software costosissimi realizzati ad esempio in Microsoft .NET vi venga restituito il fatidico errore 401.1 Unauthorized: Logon failed. Di che login si tratta? Dell’utenza anonimo usato da IIS stesso per eseguire il codice delle pagine hostate sul server. A cosa può essere dovuto? Come si risolve?

Un link interessante è il seguente: http://support.microsoft.com/kb/909887/en-us

Nel caso specifico dell’evento 529 (verificare nel registro eventi di windows quale sia il proprio) si tratta di un problema alla password dell’utente anonimo. L’utente è un vero utente dell’active directory oppure della macchina locale e la sua password è sconosciuta ma è usata proprio da IIS per autenticare tale utente e svolgere il proprio lavoro di presentazione. L’unica strada percorribile è quella di resettarla e reimpostare la nuova ovunque serva.

La procedura non è delle più semplici ma la riporto brevemente:

To synchronize the IIS password with the password that is used in Active Directory or in Local Users and Groups, follow these steps:

1. Click Start, click Run, type cmd, and then click OK.
2. Use the cd command to connect to the folder where the Adsutil.vbs file is located. By default, the Adsutil.vbs file is located in the following folder: drive:\Inetpub\Adminscripts Note drive is the folder where Windows is installed.
3. At the command prompt, type Cscript adsutil.vbs get w3svc/anonymoususerpass, and then press ENTER. Note the password that is generated.

Note You may have to set the Issecure property in the Adsutil.vbs file to False before you generate a password. (altrimenti non ve la fa vedere la nuova password ma mostra solo tanti asterischi).

To do this, follow these steps:a. In Notepad, open the Adsutil.vbs file.
b. On the Edit menu, click Find, type IsSecureProperty = True, and then click Find Next.
c. Change “IsSecureProperty = True” to “IsSecureProperty = False”.
d. Save the changes, and then close Notepad.

4. Click Start, click Run, type Dsa.msc, and then click OK.

Note If the Web server is a stand-alone server, type Lusrmgr.msc.
5. Expand the domain that you want, and then click Users. If the Web server is a stand-alone server, click Users.
6. Right-click the user account that you want, and then click Reset Password or Set Password.
7. Type the password that you obtained in step 3 two times, and then click OK.

IIS anonymous user setting

Ora avete cambiato password all’utente anonimo di IIS ma non dimenticate di andarla a settare nelle proprietà dell’IIS stesso alla voce Metodi di Autenticazione e ovunque fosse già settata in precedenza.

Leave a Reply

You must be logged in to post a comment.