Sorry, this entry is only available in Italian.
Category: Windows Server
Error from Filezilla Client to Microsoft IIS FTP Server
When you connect to ftp server create with Microsoft IIS using Filezilla Client you should have this error
GnuTLS error -48: Key usage violation in certificate has been detected. Could not connect to server
Your configuration settings are something like this :
- Protocol: FTP – File Transfer Protocol
- Encryption: Require explicit FTP over TLS
The problem is with self signed certificate on server side. This is a problem with the certificate generation of Microsoft IIS, as it does not allow the certificates to be used for digital signatures.
How to generate a valid certificate with IIS
This is a server-side issue, and it did not appear previously because earlier versions of FileZilla shipped with a GnuTLS version that didn’t make this check.
Quoting Tim Kosse’s post in the FileZilla forum thread:
In any case, the problem is with your server’s X.509 certificate chain: Either the server certificate itself or another certificate in the chain has a key usage restriction that is violated. For example a certificate with a key usage restriction to signing cannot be used to authenticate TLS connections. See section 18.104.22.168 of RFC 5280.
This is a problem with the certificate generation of Microsoft IIS (but may also happen if you incorrectly generated a certificate with another method), as it does not allow the certificates to be used for digital signatures. OpenSSL is much more relaxed about this and won’t fail because of it, so it may work with other apps.
On the client side, you can either disable TLS, downgrade to an earlier version of FileZilla (neither of these is recommended due to potential security risks), or use a different client which uses another library such as OpenSSL for now.
How to generate a valid certificate with IIS
This needs to be done on the server side, Yobviously.you can generate the certificate with PowerShell instead until the issue is fixed by Microsoft. Open PowerShell in admin mode.
The following powershell command will create our self-signed certificate for our binding and store it in the Personal Store (Note how I also store a reference to the certificate in a variable called $cert this will be needed further on):
$binding = "192.168.1.70" $cert = New-SelfSignedCertificate -DnsName "$binding" -CertStoreLocation "cert:\LocalMachine\My"
However, this is not enough to make the certificate work for HTTPS in our browser. We need to add our newly created certificate to the Trusted Root Certificate store. To do this we take our $cert variable which references our created certificate and add it to our Trusted Root Certificate store like so:
$DestStore = new-object System.Security.Cryptography.X509Certificates.X509Store([System.Security.Cryptography.X509Certificates.StoreName]::Root,"localmachine") $DestStore.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite) $DestStore.Add($cert) $DestStore.Close()
Now you have to set the new certicate on your ftp site using IIS Admin.
Migrate IMAP mailboxes to Microsoft 365 – Office 365 – Exchange online
Here are the steps required in sequence to migrate an IMAP domain to Exchange Online.
- Add the domain to your Microsoft 365 tenant. You don’t have to complete the mail server setup.
- Add domain users to Microsoft 365. Each user must have a Microsoft 365 Business Basic, Standard, or Premium license
- Prepare the csv file for migration, separated by commas. In the first line put EmailAddress, UserName, Password. In the following lines the data: “EmailAddress is the Microsoft account,” UserName “is the imap server account and” Password “is the imap server password
example of csv
EmailAddress,UserName,Password email@example.com,contoso\terry.adams,1091990 firstname.lastname@example.org,contoso\ann.beebe,2111991 email@example.com,contoso\paul.cannon,3281986
- Log in as an administrator in Microsoft 365 and go to the Exchange admin center. (Note: this guide is for the “classic” Exchange administration interface. Select “recipients” on the left; select “migration” at the top.
- At the center of the page there is a button with three dots: …. Selecting it, the endpoint is inserted, that is the Imap source server. In the next window add the new endpoint (IMAP).
- Create a new migration. launch the migration
- once the migration is complete, in the tenant, you can finish configuring the domain for what concerns the mail server, following the instructions on the tenant and changing your dns
The Rules of Migration
You can put all users in a migration. When a migration ends in error, you can delete a user from it and put the same user in another migration. You can have multiple migrations at the same time but the same user cannot exist in more than one migration. Migration can exist for up to 60 days.
It is not a migration
In reality, Microsoft does a more sophisticated operation than a “trivial” migration: it makes a sync. Synchronize entire imap mailbox to Exchange mailbox in one direction (from imap to exchange). It is sophisticated but less effective than a normal migration: it is not in real time but after 24/30 hours. So if you want to replace the mail server, users would lose at least 24 hours of email.
On Outlook clients, you can add the new Exchange account online. It will be the same as the old mailbox, but will be managed by Exchange. For a while you will then have 2 mailboxes that manage the same mail but on different servers: one is the old imap server, the other one the new Exchange server. When the migration is finished and you have also moved the mx records on the dns, you can delete the old mailbox. Before doing this, however, you must also memorize the contacts and the calendar from the “old” to the “new”:
Contacts: select all contacts, right click, select “move” and then “copy to folder …”, Exchange mailbox contacts.
Calendar: To move appointments between 2 calendars: both calendars and drag appointments from old to new.
Problems in migration
If you have any problem you can investigate using PowerShell. First install ExchangeOnlineManagement.
Connect to the tenant:
Connect-ExchangeOnline -UserPrincipalName <your Admin Username>
The password request screen appears.
List of all endpoints in the tenant
Test-MigrationServerAvailability -Endpoint <Identity of the endpoint from above>
view sync configuration of single user
Get-SyncRequest -Mailbox <user>
esport migration result for a user
Get-MigrationUserStatistics <user> -IncludeSkippedItems -IncludeReport -DiagnosticInfo "showtimeslots, showtimeline, verbose" | Export-Clixml C:\temp\MigMyUser.xml
Exchange mailboxes have a 35MB limit. If you have to move something bigger during the migration you have to change this limit.
Set-Mailbox -Identity <user> -MaxReceiveSize 150MB
- Domain on tenant : https://docs.microsoft.com/en-us/microsoft-365/admin/setup/add-domain?view=o365-worldwide
- file csv : https://docs.microsoft.com/en-us/exchange/mailbox-migration/migrating-imap-mailboxes/csv-files-for-imap-migrations
- migration : https://docs.microsoft.com/en-us/Exchange/mailbox-migration/migrating-imap-mailboxes/imap-migration-in-the-admin-center?redirectSourcePath=%252fen-us%252farticle%252fIMAP-migration-in-the-Office-365-admin-center-4682f2e4-f720-4868-91ab-207f5b0c325d
Register a web application with Azure AD Portal App Registration to connect to a Microsoft 365 tenant
Through Powershell it is possible to connect to a Microsoft 365 tenant to perform operations on users, groups and any other element of the tenant. When you use this tool, Powershell presents you with the mask for entering your account and password. You can write accounts and passwords directly in the Powershell script but it would be a serious security compromise.
An alternative is to build a software that connects directly to the Tenant through customized keys present in the Tenant itself. In other words, it is necessary to communicate to the Tenant that there is a certain application that is authorized to access the Tenant. Furthermore, for each operation that you want to perform on the Tenant it is necessary to specify the appropriate permissions. To create these applications, we recommend that you follow the excellent tutorial “.Net Core console application for calling Microsoft Graph“. This post proposes the images present in the previous tutorial only to specify how the application must be prepared on the Microsoft Tenant.
Register a web application with Azure AD Portal App Registration
Open a browser and navigate to the Azure Portal. Login using your account. Select the resource “Azure Active Directory”. On the left side menu, select “App regitstration”. Click New registration from the current page.
On the Register an application page, specify the following values:
- Name = Name of your Application
- Supported account types
- Redirect URI
- Type = Web
- Value = https://localhost:8080 (*)
(*) The Redirect URI value must be unique within your domain. This value can be changed at a later time and does not need to point to a realy hosted URI.
It is now necessary to store 2 values that will be used in your application:
- Application (client) ID
- Directory (tenant) ID
Certificates & secrets
Click Certificates & secrets.
- Click New client secret.
- On the Add a client secret dialog, specify the following values:
- Description = Your secret’s description
- Expires = In 1 year (for example)
- Click Add.
After the screen has updated with the newly created client secret copy the VALUE of the client secret. This secret string is never shown again, so make sure you copy it now.
Click API permissions.
- Click Add a permission
- On the Request API permissions panel select Microsoft Graph.
- Select Application permissions.
Now you have to choose between the permissions to authorize your app. For example, to create an application to read alla information about Tenant’s users, in the “Select permissions” search box type “User”.Select User.Read.All from the filtered list. At the end, on the API permissions content blade, click Grant admin consent for the Tenant.
Summary of the data necessary for the application
Let’s see what data your application needs to connect and operate on the Microsoft Tenant.
- applicationId = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
- applicationSecret = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
- tenantId = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
- redirectUri = “https://localhost:8080”;
- domain = “yourtenant.onmicrosoft.com”;
- User.Read.All : Read all users’ full profiles
- User.ReadWrite.All : Read and write all users’ full profiles
- Group.ReadWrite.All : Read and write all groups
- Notes.ReadWrite.All : Read and write all OneNote notebooks
Apache on Windows – AH00072: make_sock: could not bind to address [::]:80
On your Windows computer, Apache does not start. Go to the event viewer and find the event with error:
AH00072: make_sock: could not bind to address [::]: 80
The problem is that an application is using the same port 80 as your site on Apache. How to find out what this application is?
Open the command prompt (cmd). Type
You see all open ports on your computer used by applications. Find the line that (in this case) is about port 80. The PID column shows the number of the program that is using your port.
Open task manager, in the tab “Details” through the PID column you will find the program that is using your port.
You have 2 possibilities: either stop the program or, if you need the program, change the port used by this program, if possible, or the one used by Apache.
If the program you found through the PID is System, it means that Windows itself is blocking the door. Open the services and you need to stop the “World Wide Web Publishing Service” service. You will also have to set the start in manual, if instead it were in Automatic, because otherwise the next day the problem would reoccur.
Licensing Mode for Remote Desktop Session Host is not Configured
Funzionamento e configurazione dei commutatori virtuali di Hyper-V
Windows server – Active Directory – useful links
Move active directory roles from a domanin controller ti another
VERIFICARE E MODIFICARE I RUOLI FSMO DI UN DOMINIO WINDOWS
Backup Domain Controller
Aggiungere un Backup Domain Controller ad un dominio Active Directory esistente
Installing licenses for Remote Desktop
Licensing Mode for Remote Desktop Session Host is not Configured
iis error 0x80070021 on web.config
This error occurs when installing a site locally with IIS on a windows 10 or a windows 8.1. It is not excluded that it can also occur on server operating systems.
Module :IIS Web Core
Handler: Not yet determined
Configuration error: This configuration section can not be used in this way. This happens when the section is locked at the parent level. Locking is either by default (overrideModeDefault = “Deny”), or installed directly by the tag location with overrideMode = “Deny” or inherited property allowOverride = “false”.
The configuration file
Logon Method: Not yet determined
Users who have logged on: yet to be determined
You also need to install .NET and the IIS development tools
Installing Windows 2019 server on HPE server
Entering Intelligent Provisioning on the HPE server you realize that you can only install from CD ROM. But you haven’t mounted the CD player on your server.
With your iso create a bootable usb using for example Rufus. Does not work!
Download the “USB Key Utility” from the HP site to create a bootable USB with HPE specifications. Does not work!
What to do ?
The solution is very simple but poorly documented.
From your computer, go to the ILO page of the HP server. To do this you need to connect the server’s ILO port (it is a particular ethernet port) to the network. Turning on the server, if a DHCP server is active in your network, when you turn on the machine you will see, at the bottom, the ip address assigned to ILO. If a DCHP server is not active you will have to put a static ip by going to the utilities (button F9).
On the case of your HPE server there is a sticker with the password to access the ILO. Connect from your computer with a web browser to the ILO IP. The user is “Administrator”. Log in.
In this example I am using ILO 5.
On the left click on “Remote Console”.
A page appears from which you can open server management consoles, using different technologies. I’m using HTML 5. After the console opens, you have a button with a circle at the top. You can select your iso file which will be mounted on the server CD / DVD.
At this point you can restart the machine. To do this, you can send the ALT + CTRL + DEL command via the Remote Console keyboard.
When you reboot the server your iso will be mounted on CD / DVD and you can start the installation via Intelligent Provisioning.