diff --git a/configs/moxa/nsh/defconfig b/configs/moxa/nsh/defconfig index ad68f28bd20..c0a65fdb333 100644 --- a/configs/moxa/nsh/defconfig +++ b/configs/moxa/nsh/defconfig @@ -923,9 +923,9 @@ CONFIG_NSH_TELNETD_CLIENTPRIO=100 CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048 CONFIG_NSH_IOBUFFER_SIZE=512 CONFIG_NSH_TELNET_LOGIN=y -CONFIG_NSH_TELNET_USERNAME="admin" -CONFIG_NSH_TELNET_PASSWORD="nuttx" -CONFIG_NSH_TELNET_FAILCOUNT=3 +CONFIG_NSH_LOGIN_USERNAME="admin" +CONFIG_NSH_LOGIN_PASSWORD="nuttx" +CONFIG_NSH_LOGIN_FAILCOUNT=3 # # NxWidgets/NxWM diff --git a/configs/sim/README.txt b/configs/sim/README.txt index a7e4088ef6b..24cee5aa388 100644 --- a/configs/sim/README.txt +++ b/configs/sim/README.txt @@ -478,7 +478,16 @@ nsh 1. This version has one builtin function: This configuration: apps/examples/hello. - 2. This configuration has BINFS enabled so that the builtin applications + 2. This version has password protection enable. Here is the login: + + USERNAME: admin + PASSWORD: Adminstrator + + The encrypted password is retained in /etc/passwd. I am sure that + you will find this annoying. You can disable the password protection + by de-selecting CONFIG_NSH_CONSOLE_LOGIN=y. + + 3. This configuration has BINFS enabled so that the builtin applications can be made visible in the file system. Because of that, the build in applications do not work as other examples. diff --git a/configs/sim/include/README.txt b/configs/sim/include/README.txt index 6a9af0889a9..ef1246d4fc9 100644 --- a/configs/sim/include/README.txt +++ b/configs/sim/include/README.txt @@ -35,11 +35,11 @@ README 3. Create the new ROMFS image. - genromfs -f romfs_image -d etc -V SimEtcVol + genromfs -f romfs_img -d etc -V SimEtcVol 4. Convert the ROMFS image to a C header file - xxd -i image >nsh_romfsimg.h + xxd -i romfs_img >nsh_romfsimg.h 5. Edit nsh_romfsimg.h, mark both data definitions as 'const' so that that will be stored in FLASH. diff --git a/configs/sim/include/etc.tar.gz b/configs/sim/include/etc.tar.gz index 8110b8ad720..ef280e64cef 100644 Binary files a/configs/sim/include/etc.tar.gz and b/configs/sim/include/etc.tar.gz differ diff --git a/configs/sim/include/nsh_romfsimg.h b/configs/sim/include/nsh_romfsimg.h index 02b4348f982..ea107ef7093 100644 --- a/configs/sim/include/nsh_romfsimg.h +++ b/configs/sim/include/nsh_romfsimg.h @@ -1,7 +1,7 @@ const unsigned char romfs_img[] = { 0x2d, 0x72, 0x6f, 0x6d, 0x31, 0x66, 0x73, 0x2d, 0x00, 0x00, 0x01, 0xa0, - 0x70, 0xf2, 0x03, 0xbb, 0x53, 0x69, 0x6d, 0x45, 0x74, 0x63, 0x56, 0x6f, + 0x83, 0xe9, 0x44, 0x8c, 0x53, 0x69, 0x6d, 0x45, 0x74, 0x63, 0x56, 0x6f, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xff, 0xff, 0x97, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16,8 +16,8 @@ const unsigned char romfs_img[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xd1, 0xd1, 0xff, 0x20, 0x2e, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, - 0x8d, 0x9c, 0xac, 0x90, 0x72, 0x63, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6e, + 0x8d, 0x9c, 0xac, 0x88, 0x72, 0x63, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x52, 0x41, 0x4d, 0x44, 0x49, 0x53, 0x4b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x6f, 0x75, 0x6e, 0x74, @@ -28,12 +28,12 @@ const unsigned char romfs_img[] = 0x72, 0x61, 0x6d, 0x32, 0x0a, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x2d, 0x74, 0x20, 0x76, 0x66, 0x61, 0x74, 0x20, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x72, 0x61, 0x6d, 0x32, 0x20, 0x2f, 0x74, 0x6d, 0x70, 0x0a, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, - 0x18, 0x3a, 0x8c, 0x64, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, + 0x18, 0x3a, 0x8c, 0x5c, 0x70, 0x61, 0x73, 0x73, 0x77, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x64, 0x6d, 0x69, - 0x6e, 0x20, 0x30, 0x36, 0x64, 0x33, 0x33, 0x63, 0x30, 0x37, 0x64, 0x31, - 0x62, 0x31, 0x31, 0x32, 0x61, 0x65, 0x33, 0x64, 0x65, 0x32, 0x62, 0x39, - 0x35, 0x61, 0x39, 0x30, 0x31, 0x34, 0x38, 0x35, 0x33, 0x30, 0x0a, 0x00, + 0x6e, 0x20, 0x63, 0x37, 0x66, 0x61, 0x66, 0x34, 0x66, 0x63, 0x62, 0x61, + 0x37, 0x37, 0x61, 0x65, 0x36, 0x36, 0x62, 0x36, 0x33, 0x34, 0x39, 0x64, + 0x37, 0x34, 0x62, 0x30, 0x39, 0x33, 0x34, 0x32, 0x66, 0x33, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index ff0841504ed..4effb21a6f8 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -615,7 +615,7 @@ CONFIG_FSUTILS_PASSWD_KEY4=0x9abcdef0 CONFIG_NSH_LIBRARY=y CONFIG_NSH_MOTD=y # CONFIG_NSH_PLATFORM_MOTD is not set -CONFIG_NSH_MOTD_STRING="This is the message of the day" +CONFIG_NSH_MOTD_STRING="MOTD: username=admin password=Administrator" # # Command Line Configuration @@ -722,6 +722,9 @@ CONFIG_NSH_FATMOUNTPT="/tmp" CONFIG_NSH_CONSOLE=y # CONFIG_NSH_ALTCONDEV is not set CONFIG_NSH_ARCHINIT=y +CONFIG_NSH_LOGIN=y +CONFIG_NSH_CONSOLE_LOGIN=y +CONFIG_NSH_LOGIN_FAILCOUNT=3 # # NxWidgets/NxWM