All posts by Don Matteo

lebt in der Schweiz, ist System Engineer MCP bei A-Enterprise GmbH. Mitglied des UNBLOG Knowledge Network. Author und Blogger zu den Themen, Tutorials für Linux und Open Source.

Office Something went wrong, error code 80090016

Microsoft Office 365 users may experience the error message (“Something went wrong”) with the error code 80090016 when logging into the Office 365 account from Word or Excel:

office something went wrong error code 80090016

Office something went wrong, error code 80090016

Cause

It is no longer possible to log in to the Microsoft Office 365 account from an Office or Microsoft 365 application. Office something went wrong. The password entry no longer appears, or no response follows after the entry. The credentials underlying the Microsoft Trusted Platform are no longer valid.

Solution

The Microsoft Office error code 80090016 is due to incorrect processing of the TPM cryptography module. The Trusted Platform credentials must be reset. This under the user profile path %localappdata\%Packages it is the folder Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy.

By typing into the Explorer address bar: %localappdata%\Packages the folder Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy Rename to _old.

C:\Users\<username>\appdata\local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy_old

Next time you log on to your Microsoft Office 365 account, it will become the Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy folder recreated. The newly generated credentials can be processed correctly by the Trusted Platform. The message no longer appears.

what is Trusted Platform Module (TPM)

The Trusted Platform Module (TPM) technology is designed to provide hardware-based, security-related functions. A TPM chip is a secure crypto-processor that is designed to carry out cryptographic operations. The chip includes multiple physical security mechanisms to make it tamper-resistant, and malicious software is unable to tamper with the security functions of the TPM.

The most common TPM functions are used for system integrity measurements and for key creation and use. During the boot process of a system, the boot code that is loaded (including firmware and the operating system components) can be measured and recorded in the TPM. The integrity measurements can be used as evidence for how a system started and to make sure that a TPM-based key was used only when the correct software was used to boot the system.

TPM-based keys can be configured in a variety of ways. One option is to make a TPM-based key unavailable outside the TPM. This is good to mitigate phishing attacks because it prevents the key from being copied and used without the TPM. TPM-based keys can also be configured to require an authorization value to use them. If too many incorrect authorization guesses occur, the TPM will activate its dictionary attack logic and prevent further authorization value guesses.

Sendmail using echo message attachment on Linux

sendmail send message and attachment use echo. sendmail implements Postfix’s compatibility interface and is present in almost all Unix-like operating systems, as mail transfer agent whose history goes back to the early 1980s.

How to sendmail echo message attachment

sendmail sends message over the Internet to a specific recipient. This can be done by running the sendmail command on a Linux command line, and can also be used within a shell script.

  sendmail: fatal: open /etc/postfix/main.cf: No such file or directory

Make sure sendmail is present on the Linux host with the command which sendmail or man sendmail. If sendmail is not found and no MTA like Postfix is installed, sendmail can be deployed as follows.

$ sudo apt install sendmail -y

sendmail in the command line

The following example shows a sendmail command to send a message from the command line with using the echo command.

$ echo -e "Subject:Test Mail using sendmail \nThis is a Test Message\n" | sendmail youremail@example.tld

The next command sends an email with sender (From:) address.

$ /usr/sbin/sendmail youremail@example.tld
From: nobody@example.tld
Subject: Test Mail using sendmail
This is a Test Message
.

  Enter period (.) ends the editor and the e-mail will by submit.

Example email is interactively created by each line, a message with the subject delivered to inbox of youremail@example.tld.

Change the recipient accordingly, make sure sendmail is present on the host and the host is allowed to send email.

Further, sendmail robs the pipeline instruction, thereby making it possible to send a message using a text file.

$ /usr/sbin/sendmail < message.txt -t -i youremail@example.tld

Example with the content of the message.txt file.

From: nobody@example.tld
Subject: Test Mail using sendmail
This is a Test Message

  The sendmail -i option handles reading the message from standard input without a period (.) at the end of a line.

The -t option extracts the recipients from the message headers and adds them to all recipients specified on the command line.

How to send message with attachment use sendmail

sending an email directly from a host, in this example sendmail is used to send a file as an attachment.

Here is to filter out the delivery attempts rejected as SPAM “blocked using” on a Postfix MTA, and to send them as archives.txt.gz, for this purpose.

Postfix must be configured on the host, it can also be another local MTA, or an external SMTP-Relay is used.

#!/bin/bash
cat /var/log/maillog* | grep 'blocked using' | grep 'middleton.tld' > /tmp/blocked.txt
gzip -f /tmp/blocked.txt
( echo "to: sysop@example.tld"
  echo "from: no_reply@$HOSTNAME"
  echo "subject: Report of messages blocked by $HOSTNAME"
  echo "mime-version: 1.0"
  echo "content-type: multipart/related; boundary=messageBoundary"
  echo
  echo "--messageBoundary"
  echo "content-type: text/plain"
  echo
  echo "Please find the document attached."
  echo
  echo "--messageBoundary"
  echo "content-type: text/plain; name=blocked.txt.gz"
  echo "content-transfer-encoding: base64"
  echo
  openssl base64 < /tmp/blocked.txt.gz) | sendmail -t -i

  The -t option extracts the recipients from the message header.
-i option don´t treat a . character as the end of input.

Conclusion

This example shows how to use sendmail to send an email with attachment directly from the Linux shell.

By changing the individual lines, many other applications can come into play, whereby the Base64 encoding is done by openssl, the echo statements performs the MIME message body.

  more related in this post and here.