mirror of https://gitee.com/openkylin/docs.git
add en/Development-And-Common-Documents/Interesting_Linux_Easter_Eggs.md.
Signed-off-by: 康艳红 <731193006@qq.com>
This commit is contained in:
parent
74b32fa788
commit
df2855557e
|
@ -0,0 +1,27 @@
|
|||
# <center>Funny Linux egg - offending users with sudo</center>
|
||||
#### <center>Author: Little K</center>
|
||||
#### <center>2022-04-22 23:36:00</center>
|
||||
|
||||
One can configure sudo (which is used to give authorization to commands) to offend users who have lost their passwords incorrectly. Take a look at it!
|
||||
|
||||
First, open a terminal and type the following command:
|
||||
|
||||
**sudo visudo**
|
||||
|
||||
It is highly recommended to use visudo to edit the /etc/sudoers configuration file. Visudo is used for two reasons: it prevents two users from modifying it at the same time, and it helps to verify that the changes are correct. visudo will not save a configuration file with syntax errors without permission, it will prompt you for problems and ask what to do about them. visudo opens configuration files in vi by default, while in Ubuntu Kylin visudo opens /etc/sudoers in nano by default.
|
||||
|
||||
Then, at the top of the file, add this line:
|
||||
|
||||
**Defaults insults**
|
||||
|
||||
As shown in the image:
|
||||
|
||||

|
||||
|
||||
Next, save and close the file. If you are using nano, press Ctrl+X to exit and it will prompt you if you want to save the changes. Please press Y to save the changes.
|
||||
|
||||
Then, type sudo -k in the terminal to clear the password cache. Finally, enter the wrong password in the sudo command:
|
||||
|
||||

|
||||
|
||||
Look, it's still impatient with me. Now you can also cry to your friends about your own sudo bullying you ^_^.
|
Loading…
Reference in New Issue