Category: shell

espite some severe bugs in sudo, it remains the defacto tool to gain root shell or run command as another user on Linux, macOS, and Unix-like systems. The sudo command allows the system administrator to grant an individual user access to unprivileged commands.

Let us see how to remind developers and unprivileged users about the power of sudo for fun and profit. In this quick tip, I will show you how to add some spice to your sudo session with a lecture file on Linux or Unix.

Run:sudo vim /etc/sudo_lecture.txt Append stuff (download sudo_lecture.txt file to avoid printing garbish on screen): Our fancy sudo warning or lecture is here: Let us use the toilet command:sudo sh -c 'toilet -f bubble --metal "Be careful with sudo" > /etc/sudo_lecture.txt' sudo -k sudo -i

Related Articles