Environment: Alma Linux 8.5.latest, cPanel 94.0.23 LTS
Jailshell users get a minor error when logging into command line (ie using 'Terminal' or via SSH):
The error is coming from this section of /etc/profile.d/scl-init.sh:
The sed line is called because MODULEPATH is unset at runtime, and fails because /usr/share/Modules/init/.modulespath does, in fact, not exist. After logon, a jailshell user ends up with this in their environment:
When using the 'normal' shell (ie bash), MODULEPATH is set at runtime and thus that section is skipped and the error does not occur. In this case, they end up with this instead in their environment:
I did some digging to try to find out where the difference lies but was unable to locate it. I'm guessing maybe some logon piece is missing somewhere from the jail environment, but the difference might lie in the jailshell binary itself.
As far as I've seen this doesn't seem to have any impact on normal use. I have had users ask about it though.
Thanks!
Jailshell users get a minor error when logging into command line (ie using 'Terminal' or via SSH):
Code:
sed: can't read /usr/share/Modules/init/.modulespath: No such file or directory
Code:
if [ "${MODULEPATH:-}" = "" ]; then
MODULEPATH=`sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' ${MODULESHOME}/init/.modulespath`
fi
Code:
MODULEPATH=/etc/scl/modulefiles:
When using the 'normal' shell (ie bash), MODULEPATH is set at runtime and thus that section is skipped and the error does not occur. In this case, they end up with this instead in their environment:
Code:
MODULEPATH=/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
I did some digging to try to find out where the difference lies but was unable to locate it. I'm guessing maybe some logon piece is missing somewhere from the jail environment, but the difference might lie in the jailshell binary itself.
As far as I've seen this doesn't seem to have any impact on normal use. I have had users ask about it though.
Thanks!