ghantoos / lshell

lshell is a shell coded in Python, that lets you restrict a user's environment to limited sets of commands, choose to enable/disable any command over SSH (e.g. SCP, SFTP, rsync, etc.), log user's commands, implement timing restriction, and more.
GNU General Public License v3.0
437 stars 112 forks source link

How to turn off or uninstall lshell? #207

Open Freelensia opened 4 years ago

Freelensia commented 4 years ago

Hello,

We have read the Readme.md file and browsed through the issues but did not find our solution.

1, We have LSHELL turned on by default for root user. How do we turn it off and on at will?

  1. We have tried to uninstall with command: apt-get purge lshell but we got response:

Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package lshell E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success E: Sub-process [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true returned an error code (100) E: Failure running hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true

Can somebody help? Thanks.

josephcsible commented 4 years ago
  1. Boot your system in rescue mode and change root's default shell back to something sane.
  2. Note that lshell isn't the same as ishell.
Freelensia commented 4 years ago

Hi @josephcsible thanks for the advice. I run Linux on Windows via WSL and do not have access to rescue mode. If I just run bash.exe then lshell is not loaded. But the command apt-get purge lshell also returns unable to locate package lshell.

Is there another work-around?

josephcsible commented 4 years ago
  1. If you can start bash, then do so and edit /etc/passwd through it to fix the shell.
  2. Once again, you're using lshell even though this is ishell ishell even though this is lshell.
Freelensia commented 4 years ago

@josephcsible I am pretty sure this is Lshell...

A simple Google search of github LSHELL vs. github ISHELL shows that LSHELL is the right answer. Am I missing something?

josephcsible commented 4 years ago

Yes, that's right. I swapped them in my last post, but they were swapped in your original post too until you edited it just now.