文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>让某一个sudo命令不需要输密码

让某一个sudo命令不需要输密码

时间:2010-05-02  来源:ckanhw

sudo的-A选项是一个非常有用的选项,它可以使得sudo命令不需要每次输密码,它的作用原文如下: Normally, if sudo requires a password, it will read it from the current terminal.  If the -A (askpass) option is specified, a (possibly graphical) helper program is executed to read the user's password and output the password to the standard output.  If the SUDO_ASKPASS environment variable is set, it specifies the path to the helper program.  Otherwise, the value specified by the askpass option in sudoers(5) is used.
即通过指定一个helper proram用于提供密码 我只试过用第一种方法: 1.先写了个简单的C程序,只有一行:printf("密码\n"); \n必须要加。编译,获得可执行代码。 2.指定SUDO_ASKPASS为上面的可执行代码路径。 3.使用sudo命令,格式为:sudo -A XXXX
相关阅读 更多 +
排行榜 更多 +
崩溃大陆2鱼竿如何获取

崩溃大陆2鱼竿如何获取

冒险解谜 下载
狙击手行动

狙击手行动

冒险解谜 下载
狙击突围行动最新版

狙击突围行动最新版

冒险解谜 下载