I have user1 and user2. Normally, the user root can switch on all users with su
command.
I want to restrict su
command so that the user root can switch only to user1. It is possible??
I have user1 and user2. Normally, the user root can switch on all users with su
command.
I want to restrict su
command so that the user root can switch only to user1. It is possible??
Nope. Root is root, and can do all and see all.
As womble already said, you can't restrict access to su
for root
, since it could just change whatever you use to restrict su
with, anyways.
If you want to restrict su
in order to stop root
from reading your personal files you could encrypt them (or your whole home directory).