2

I am looking for a limited shell access in Ubuntu 18.04+. Previously up to 16.04, the repos contain lshell, but I am not seeing it in 18.04 or 18.10. Are there any alternatives to lshell currently available in Ubuntu?

My requirement is to just allow a custom location with few binaries for a limited shell access.

My requirement is as follows: I have a set of scripts and binaries and i am going to pack them into /opt/custom location and the user should have access only to this location just to execute these binaries/scripts.

8
  • 1
    github.com/ghantoos/lshell download and do a python setup.py install --no-compile --install-scripts=/usr/bin/
    – Rinzwind
    Apr 2, 2019 at 10:53
  • Thanks @Rinzwind. I have seen it. But is there any security implication behind removing it from Ubuntu's default repo?
    – GuruPrasad
    Apr 2, 2019 at 11:06
  • Yes there might be security implications. Software developed for 16.04 mosttimes is not suited for 18.04. And as it was made in python: there is a transition in progress where py2 is removed in favor of py3. Maybe lshell does not have a py3 version and was therefor removed from the repo.
    – Rinzwind
    Apr 2, 2019 at 11:24
  • github issue for the port to py3: github.com/ghantoos/lshell/issues/191
    – dessert
    Apr 2, 2019 at 11:47
  • 1
    I don't know your tool, but in general: If there was a package, but isn't available anymore, take a look at packages.ubuntu.com -> packages.ubuntu.com/xenial/lshell ... on the right side below, there is a box 'similar packages'. Sometimes it is useful as start to test alternatives ... Also there is the launchpad link, sometimes with info, why the package isn't in the repo, anymore.
    – LupusE
    Apr 2, 2019 at 12:12

1 Answer 1

0

You can try chroot with only limited set of commands.

chroot (change root) is an isolation facility towards a process from Linux kernel. chroot changes the root (/) filesystem for one process into another directory. People calls chroot as jail, an environment when a process works only inside and can't see outside. In practice, creating a chroot environment is likely copying a program and its dependencies inside a directory then performing chroot command. In other words, chroot is likely creating a little clone of whole original system inside a directory. In Linux, chroot needs root user. You will see it. I will tell how to do chroot for bash by example. This tutorial is applicable to another Linux distributions such as Linux Mint or Debian.

Reference

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .