1

I have the need to add the LESS and MORE commands to a jailed-user. I've attempted the following and can't quite get it to work:

# which less;which more 

/usr/bin/less /usr/bin/more

Now that I know where the binaries are, I do the following:

jk_cp -j /usr/jail /usr/bin/less
jk_cp -j /usr/jail /usr/bin/more

Then when I go to test it out I get the following:

su - jailed-user
less err.log

WARNING: terminal is not fully functional err.log (press RETURN)

Not sure what else I need to do to make this fully functional

user2643864
  • 165
  • 1
  • 1
  • 4

1 Answers1

1

less and more use Linux terminfo database for sending proper code combinations for your terminal you are using.

The terminfo database is located at /usr/share/terminfo. This has to be available inside the jail.

You don't need the whole database, only the term types that are in active use.

When logging in to the server, you can use set to see the value of TERM variable, which tells what entry the current session needs.

The termtype varies between terminal programs used to access the server.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58