F
F
foxyrus2012-04-09 13:35:02
linux
foxyrus, 2012-04-09 13:35:02

telnetd and busybox path?

Good day!
I admit honestly - not selenium in Linux (only at the level of launching basic commands in the console).
I have a router on which Linux is running and the telnetd service starts (I connect through it).
At the moment, telnet does not pick up paths from PATH that are registered in etc/profile + are registered in rc.sh, which is launched when the router starts.
service starts like this
telnetd -l /bin/ash

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
danfe, 2012-04-10
@danfe

You can find out which user you are logged in with using the id command. /etc/profile (like .profile) is only readable for the login shell (distinguisher: argv[0][0] == '-'). I suspect that when you explicitly pass the loginpath via -lthe telnetd key, constructing the argv for execvp() does not prefix it with a minus. I think this is the reason.
And why are you not satisfied with the default behavior of telnetd, without parameters? (In this case, the default /bin/login should run, which will spawn the login shell correctly.)

V
Vitaly Peretyatko, 2012-04-09
@viperet

try to create a .profile file in your home folder and write commands in it ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question