From eec5e1576e70d27caa639f36e34679ed18817458 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 8 Jul 2021 16:05:57 +0200 Subject: Add installer mode for stage4 --- core/modules/pam/data/etc/profile.d/00-user-env.sh | 14 ++++++++++++++ core/modules/pam/module.conf | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 core/modules/pam/data/etc/profile.d/00-user-env.sh (limited to 'core/modules/pam') diff --git a/core/modules/pam/data/etc/profile.d/00-user-env.sh b/core/modules/pam/data/etc/profile.d/00-user-env.sh new file mode 100644 index 00000000..a2d10989 --- /dev/null +++ b/core/modules/pam/data/etc/profile.d/00-user-env.sh @@ -0,0 +1,14 @@ +#!/bin/ash + +# Stuff we might wanna know +PWENT= +[ -n "$UID" ] && PWENT=`getent passwd "$UID"` +[ -z "$PWENT" ] && [ -n "$PAM_USER" ] && PWENT=`getent passwd "$PAM_USER"` +if [ -n "$PWENT" ]; then + export USER=`echo "$PWENT" | awk -F ':' '{print $1}'` + export GID=`echo "$PWENT" | awk -F ':' '{print $4}'` + export HOME=`echo "$PWENT" | awk -F ':' '{print $6}'` + export GROUP=`id -gn` + export LOGNAME=$USER + export HOSTNAME=`hostname` +fi diff --git a/core/modules/pam/module.conf b/core/modules/pam/module.conf index 86b91b8d..7789139d 100644 --- a/core/modules/pam/module.conf +++ b/core/modules/pam/module.conf @@ -1,4 +1,7 @@ #!/bin/bash +REQUIRED_MODULES=" + slxlog +" REQUIRED_BINARIES=" ldapsearch rpc.gssd -- cgit v1.2.3-55-g7522