首页 > 其他 > 详细

执行sudo命令时的提示语,如何修改?

时间:2018-06-26 22:21:52      阅读:317      评论:0      收藏:0      [点我收藏+]

如图所示,执行sudo命令,提示语(有中文和英文两个版本):

技术分享图片

上面的提示内容是sudo软件原生的内容。

使用下面的方法,有的时候是可行的。sudo -p ‘提示语‘ 命令

技术分享图片

如果要修改sudo软件原生的提示内容,只有重新编译软件。

屏蔽提示的方法:https://superuser.com/questions/500119/keeping-the-fancy-sudo-warning-forever

Create a file inside /etc/sudoers.d/ You can use this command

sudo vim /etc/sudoers.d/privacy

Now paste this line into the file ‘privacy‘.

Defaults   lecture = always

Now close Terminal/console, Reopen it and try to do something with sudo.

 

Can I also disable the message by setting lecture to never? – Richard de Wit Jun 14 ‘17 at 10:16
Yes, the options for lecture are: always never once sudoers man – Chris Nov 28 ‘17
 
参考:
 
https://www.ostechnix.com/change-sudo-prompt-linux-unix/
https://bbs.archlinux.org/viewtopic.php?id=39499
http://www.webjx.com/server/linux-18515.html

 

执行sudo命令时的提示语,如何修改?

原文:https://www.cnblogs.com/shengulong/p/9231383.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!