bad handling of environment variables with jailkit ssh users in server/conf/bash.bashrc.master
at start of bash.bashrc these variables exist
HOME=/home/tester2 UID=5005 USER=tester2 USERNAME=tester2
[note] LOGNAME is not set
bash.bashrc has this logic
<tmpl_if name='jailkit_chroot'>
Hack for Jailkit User to change back to the logged in user
if [ "$LOGNAME" != $USER ]; then export HOME=<tmpl_var name='home_dir'>$LOGNAME export USER=$LOGNAME export USERNAME=$LOGNAME cd $HOME fi
Change machine hostname to site domain
export HOSTNAME=<tmpl_var name='domain'>
</tmpl_if>
So because LOGNAME != USER the variables become:
HOME=/home/ USER= USERNAME=
Is there a good reason for this and why does it all depend on $LOGNAME?