I have a user
test1 that i want to limit it to only run specific commands. I found this solution and I tested it (logged in with test1 and ran some random commands. none of them worked but
date) and it worked. here is what i did:
cp /bin/bash /bin/rbash useradd -s /bin/rbash test1 mkdir /home/test1/bin chmod 755 /home/test1/bin echo "PATH=$HOME/bin" >> /home/test1/.bashrc echo "export PATH" >> /home/test1/.bashrc chattr +i /home/test1/.bash_profile ln -s /usr/bin/date /home/test1/bin
since I'm more of a DBA than a linux pro like you guys I don't know if this is enough and if there is any other thing i need to do to prevent this
test1 from doing anything on system.any suggestion for increasing security?
as you can see, if i create link for a command like
ln -s /sbin/ifconfig /home/test1/bin
test1 can also run
add | del | up | down with
ifconfig. how i can limit this command with for example this option
-a or it can be executed with no options at all?