in reply to Re^5: creating a secure environment for perl scripts to run
in thread creating a secure environment for perl scripts to run
Just be aware that su can also be used by root to downgrade to other users on occasion.
That can also be done by sudo:
/root>sudo -u nobody whoami nobody /root>
Add -i to get an interactive shell, if possible. Note that the nobody account is intentionally configured to have an invalid home directory and an invalid login shell, so you won't get an interactive shell as nobody.
/root>sudo -u nobody -i sudo: unable to change directory to /nonexistent: No such file or dire +ctory sudo: unable to execute /usr/sbin/nologin: No such file or directory /root>sudo -u alex -i /home/alex>whoami alex /home/alex>exit logout /root>
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: creating a secure environment for perl scripts to run
by hippo (Archbishop) on Feb 03, 2022 at 17:03 UTC |