Web interface lockout after a password change on 4.3.1
Summary
On NAbox 4.3.1, changing the admin password can lock you out of the web
interface. SSH still accepts the new password. Restore the factory
admin line in /etc/shadow, sign in, upgrade to 4.3.2, then change
the password again.
Problem
After a password change on 4.3.1:
- The web interface rejects the new password and the previous one.
- SSH as
adminstill accepts the new password.
chpasswd stores the new password as a yescrypt hash ($y$…). The 4.3.1 web login only verifies older hashes, such as SHA-512 ($6$…). SSH uses the system libraries and still accepts the yescrypt hash. Version 4.3.2 verifies yescrypt, so a password change made after that upgrade succeeds.
Do not run passwd or change the password again from the web interface while you are still on 4.3.1. That writes another yescrypt hash and the web interface stays locked.
Resolution
Warning
The line below is the factory admin password, Netapp01. The appliance
uses that password until you change it after the upgrade to 4.3.2.
Replace only the admin line. Leave every other line in /etc/shadow
as it is.
-
From a host that can reach the appliance, SSH in as
adminand use the password you set when the web interface stopped accepting it. -
Replace the
adminline. Keep the single quotes so the shell does not expand$.
sudo sed -i.bak 's|^admin:.*|admin:$6$xyz$yaRDgN7.A7K4bXIZKZoP4z27neqwLd6q2DyQvKkHvDmAQlGP04f4T/VFfGMavMZHC13Gtngc1hXXR6ds1zfWI.:20039:0:99999:7:::|' /etc/shadow
sed edits the file in place and keeps its permissions. A copy of the previous file is written to /etc/shadow.bak.
- Confirm the line matches exactly:
grep '^admin:' /etc/shadow
admin:$6$xyz$yaRDgN7.A7K4bXIZKZoP4z27neqwLd6q2DyQvKkHvDmAQlGP04f4T/VFfGMavMZHC13Gtngc1hXXR6ds1zfWI.:20039:0:99999:7:::
-
Sign in to the web interface with username
adminand passwordNetapp01. -
Upgrade to NAbox 4.3.2 from Settings → Upgrade. Download the
.nbxpackage from the Downloads page and install it on the NAbox tab. See Upgrading NAbox. -
After the upgrade finishes and the web interface is back, open Preferences → Admin Password and set a new password.
-
Remove the shadow backup once the new password works:
sudo rm -f /etc/shadow.bak
Grafana keeps the password from the change that locked the web interface until step 6. That step updates both the web interface and Grafana.
If SSH rejects the password as well, reset it from the virtual machine console as described in the FAQ, then continue from step 5.
Verification
- Before the upgrade, the web interface accepts
admin/Netapp01. - After the upgrade, the UI reports version 4.3.2.
- A password change from Preferences → Admin Password succeeds, and the web interface accepts that new password.