Florence.Strac answered on October 8th 19 at 00:40
To find out under what user you are logged in, you can use the team id. /etc/profile (and .profile) is read only for login shell (hallmark: argv == '-'). I suspect that when you explicitly pass loginpath through the key -l, then telnetd, designing argv for execvp(), not puts at the beginning of minus. I think that's the reason.
And what you do not like the default behavior of telnetd, no parameters? (In this case, you must run the standard /bin/login, which will spawned the login shell is correct.)
Velva_Wym answered on October 8th 19 at 00:42
try it in your home folder to create the file .profile and commands to write in it...