你如何让 sudo 保存密码? [英] how do you make sudo save the password?

查看:37
本文介绍了你如何让 sudo 保存密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何设置它以便 sudo 不会每次都提示你输入密码?我有root.

how do you set it so that sudo doesn't prompt you for your password every time? i have root.

推荐答案

使用/etc/sudoers 中的 NOPASSWD 选项.

Use the NOPASSWD option in /etc/sudoers.

不过,这通常是一个坏主意,因为任何用户在没有密码的情况下访问通过 sudo 运行命令的帐户都可能会破坏系统.

This is generally a bad idea, though, as any user who gets access to an account that run commands through sudo without a password may be able to compromise the system.

另外,sudo 应该记住你的密码一段时间.如果这对您来说超时时间过早,您可以按照此处的说明增加超时时间:http://forums.macosxhints.com/showthread.php?t=83344

Also, sudo should remember your password for a period of time. If this is timing out too soon for your tastes, you can increase the timeout by following instructions here: http://forums.macosxhints.com/showthread.php?t=83344

这篇关于你如何让 sudo 保存密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆