Copie /usr/bin/whoami
para /usr/bin/whoami2
.
Crie um novo whoami
, /usr/bin/whoami
e chmod +x /usr/bin/whoami
#!/usr/bin/bash
# imposter /usr/bin/whoami
if [ $USER = user1 ]
then
echo root
exit 0
fi
whoami2
exit 0