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
435 stars 112 forks source link

Change home directory #141

Closed brijesh27 closed 8 years ago

brijesh27 commented 8 years ago

Hi,

Is this possible with lshell, that we can read

I have 2 users : test1 and test2 , test1 having lshell and i want this user can only read all files/directory under /home/test2 user and only read /etc/hosts file.

[test1] allowed : ['ls','pwd','cat','vim','echo','cd','vi'] warning_counter : 5 path : ['/etc/', '/usr', '/home/test2/'] home_path : '/home/test_user' logpath : /var/log/lshell/ loglevel : 4

is this right config?

ghantoos commented 8 years ago

Hi @brijesh27,

You cannot restrict the user to one file (e.g. /etc/hosts). Though this might be interesting to have this feature.

Otherwise, your configuration file seems correct.

Cheers