diff options
-rw-r--r-- | package/base-files/Makefile | 9 | ||||
-rw-r--r-- | target/config/Config.in.runtime | 39 |
2 files changed, 45 insertions, 3 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 059219e5b..fc2ca7e4d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(ADK_TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.1 -PKG_RELEASE:= 12 +PKG_RELEASE:= 13 PKG_SECTION:= base/apps PKG_DESCR:= basic files and scripts @@ -174,4 +174,11 @@ ifneq (${ADK_SIMPLE_NETWORK_CONFIG_PROXY},) endif endif +ifeq ($(ADK_RUNTIME_ADDUSER),y) + mkdir -p ${IDIR_BASE_FILES}/$(ADK_RUNTIME_USER_HOME) + printf "$(ADK_RUNTIME_USER_NAME):x:100:100:$(ADK_RUNTIME_USER_NAME):$(ADK_RUNTIME_USER_HOME):$(ADK_RUNTIME_USER_SHELL)" >> ${IDIR_BASE_FILES}/etc/passwd + printf "$(ADK_RUNTIME_USER_NAME):$(ADK_RUNTIME_USER_PASSWORD):16514:0:::::" >> ${IDIR_BASE_FILES}/etc/shadow + printf "$(ADK_RUNTIME_USER_NAME):x:100:" >> ${IDIR_BASE_FILES}/etc/group +endif + include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 3af067c16..6c7676254 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -20,8 +20,43 @@ config ADK_RUNTIME_PASSWORD default "$1$bJoW4DmS$7fUVat.9iFSAePzA4j4Jm." help Predefine the root password enabled in the built image. - Use ./host_x86_64-linux-gnu/usr/bin/mkcrypt to generate the hash. - Default password is linux123. + Use ./host_*/usr/bin/mkcrypt to generate the hash. + Default password is linux123 + +config ADK_RUNTIME_ADDUSER + bool "add an user" + default n + help + Enable this option to add an unprivileged user. + Fixed UID/GID 100 is used. A group with the same name is added. + +config ADK_RUNTIME_USER_NAME + string "user name" + default "adk" + depends on ADK_RUNTIME_ADDUSER + +config ADK_RUNTIME_USER_PASSWORD + string "user password" + default "$1$bJoW4DmS$7fUVat.9iFSAePzA4j4Jm." + depends on ADK_RUNTIME_ADDUSER + help + Predefine the user password enabled in the built image. + Use ./host_*/usr/bin/mkcrypt to generate the hash. + Default password is linux123 + +config ADK_RUNTIME_USER_HOME + string "user home directory" + default "/home/adk" + depends on ADK_RUNTIME_ADDUSER + help + Set the home directory to use. + +config ADK_RUNTIME_USER_SHELL + string "user shell" + default "/bin/sh" + depends on ADK_RUNTIME_ADDUSER + help + Set the shell to use. config ADK_RUNTIME_START_SERVICES bool "start services by default" |