Skip to content

!nshlib: Require explicit fixed login password at build time#3557

Open
Abhishekmishra2808 wants to merge 1 commit into
apache:masterfrom
Abhishekmishra2808:nsh-login-empty-password
Open

!nshlib: Require explicit fixed login password at build time#3557
Abhishekmishra2808 wants to merge 1 commit into
apache:masterfrom
Abhishekmishra2808:nsh-login-empty-password

Conversation

@Abhishekmishra2808

@Abhishekmishra2808 Abhishekmishra2808 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

BREAKING CHANGE: Set CONFIG_NSH_LOGIN_PASSWORD in menuconfig at Application Configuration ---> NSH Library ---> Verification method ---> Fixed username/password ---> Login password before building with CONFIG_NSH_LOGIN_FIXED=y.

Testing

  • NSH_LOGIN_FIXED=y + empty password → build fails
  • Set password in menuconfig → build succeeds
  • checkpatch passes

Change NSH_LOGIN_USERNAME default to root, remove the Administrator and
nuttx password fallbacks, and fail the build when NSH_LOGIN_FIXED is
enabled with an empty CONFIG_NSH_LOGIN_PASSWORD.

BREAKING CHANGE: Builds with CONFIG_NSH_LOGIN_FIXED=y no longer succeed
until CONFIG_NSH_LOGIN_PASSWORD is set in menuconfig at Application
Configuration ---> NSH Library ---> Verification method --->
Fixed username/password ---> Login password. Update local defconfigs or
set the password via menuconfig before building.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
@Abhishekmishra2808 Abhishekmishra2808 force-pushed the nsh-login-empty-password branch from 2b8eb4f to a5ffd53 Compare June 24, 2026 14:00
Comment thread nshlib/Kconfig
config NSH_LOGIN_PASSWORD
string "Login password"
default "Administrator"
default ""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the default value

Comment thread nshlib/Makefile
CSRCS += nsh_passwdcmds.c
endif

ifeq ($(CONFIG_NSH_LOGIN_FIXED),y)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not remove the default value in the case of CONFIG_NSH_LOGIN_FIXED directly and remove this warning check, so the user must enter the password in defconfig.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants