[SOLVED] how to block a command ubuntu..

just i wont allow someone to run a command. 
example perl. 

so i was trying to do " alias perl='echo "nope!"' " into bash aliases

but we still are able to use perl with direct path /usr/bin/perl

so anyone know a way ex to block perl 100% ?

D❤ᴘᴇ.ᴀʟ Oᴡɴᴇʀ.
I am gonna give you some pointers now.

Try reading up on jailed ssh and chroot using google.

May be i will try to be more helpful when i come back. Take care.
Many thanks to Freevps, Chris (cw1998), The Guy( ID 4810), optimus, GHP and the other  staff members.
This blocking is highly unnecessary, if you don't want to have a another user accessing the higher level commands (sudo) just don't add them to the sudo list or run
deluser ilovepi sudo
this should remove the user ilovepi from the sudoers list.

If you want to
Quote:remove Perl 100%
just do
sudo apt remove perl -y

I'm not sure why someone would do this but everyone's entitled to their own opinion, I guess.
@MichaelW remove perl 100% apt remove? :rofl:  i wanna block not remove. And have you try to execute " apt-get remove perl -y" on ubuntu 14.04? wa happen with ssh?
btw just to ask, are you able to remove perl like that because i'm not Skeptical
root@raws:~# apt-get remove perl
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package 'perl' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@raws:~# perl -v

This is perl 5, version 18, subversion 2 (v5.18.2) built for x86_64-linux-gnu-thread-multi
(with 44 registered patches, see perl -V for more detail)
and what if user will install perl again? even if can't install because you removed from sudoers the user can still use perl by downloading it  Wink

in my case this isn't a simple user. it's root with full access on vps. just will let it to use that vps for some days. but i won't allow some commands which can be used for bad things!
so i was trying to do that stuff on bash aliases. i know that can be removed but that dude doesn't have the knowledge about that.

so i'll try another way. ex i'll make perl command to lock out from vps user if user will try to execute it!
thanks for your reply's  :y:  .
D❤ᴘᴇ.ᴀʟ Oᴡɴᴇʀ.

Users browsing this thread: 1 Guest(s)