Skip to content

Change validation method for Lenovo BIOS passwords#15

Closed
pasqualm wants to merge 3 commits into
ConfigJon:masterfrom
pasqualm:master
Closed

Change validation method for Lenovo BIOS passwords#15
pasqualm wants to merge 3 commits into
ConfigJon:masterfrom
pasqualm:master

Conversation

@pasqualm

@pasqualm pasqualm commented Mar 7, 2022

Copy link
Copy Markdown

The operation SetBiosPassword needs a reboot to be efective. After the first execution, all SetBiosPassword operations will fail even if the password is correct until the reboot.
This can create a problem if you do multiple Manage-LenovoBiosSettings operations without rebooting between them.
The method for checking if the password is correct is changed to trying to set a value with it's current value to try to avoid this situation

The operation SetBiosPassword needs a reboot to be efective. After the first execution, all SetBiosPassword operations will fail even if the password is correct until the reboot.
This can create a problem if you do multiple Manage-LenovoBiosSettings operations without rebooting between them.
The method for checking if the password is correct is changed to trying to set a value with it's current value to try to avoid this situation
@pasqualm

pasqualm commented Mar 7, 2022

Copy link
Copy Markdown
Author

Hi Jon
Please, consider merging this change, it has been necessary to make make your tool work well in our environment and can be useful for others.

Best regards :)

Some HP models return the config info with a space in front of them.  Change to manage correctly this situation
Some HP models return the config info with a space in front of them. Change to manage correctly this situation when setting values
@ConfigJon

Copy link
Copy Markdown
Owner

Sorry for the long delay. The Lenovo side is now addressed differently in v2.3.0: on 2020+ ThinkPad and 2017+ ThinkCentre/ThinkStation systems, the script uses the Lenovo_WmiOpcodeInterface and authorizes the supervisor and SMP password checks via WmiOpcodePasswordAdmin, which is Lenovo's modern path for this. Legacy systems retain the documented firmware limitation. The HP portion (TrimStart on the asterisk-prefix check) is being handled separately via #11. Closing this as superseded; the v2.3.0 release overview covers the new opcode-interface approach.

@ConfigJon ConfigJon closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants