博客
关于我
用户名不在sudoers文件中,此事将被报告。
阅读量:710 次
发布时间:2019-03-21

本文共 391 字,大约阅读时间需要 1 分钟。

新建了帐号chen,执行sudo时提示信息:

[sudo] password for chen: chen 不在 sudoers 文件中。此事将被报告。

sudo命令可以让你以root身份执行命令,完成一些普通用户无法完成的任务。并非所有用户都能够执行sudo,因为权限信息存储在/etc/sudoers文件中。

要为普通用户添加sudo权限,可以通过编辑器或命令visudo进行配置。例如:

User privilege specification

root ALL=(ALL:ALL) ALL

chen ALL=(ALL:ALL) ALL

每个字段之间使用一个tab分隔。在使用root或sudo身份进行编辑时,务必确保保存时使用wq!命令以避免权限丢失。

注:sudoers文件的权限设置为440,仅允许root用户读取。在使用root或sudo身份进行修改时,务必谨慎操作。

转载地址:http://fpwrz.baihongyu.com/

你可能感兴趣的文章
php composer
查看>>
reflow和repaint引发的性能问题
查看>>
Reflection反射机制原理、使用场景 及 缺陷
查看>>
php csv 导出
查看>>
php curl 实例+详解
查看>>
php curl_init函数用法(http://blog.sina.com.cn/s/blog_640738130100tsig.html)
查看>>
php curl_multi批量发送http请求
查看>>
php curl请求微信发红包接口出现错误:Peer's Certificate issuer is not recognized.
查看>>
PHP curl请求错误汇总和解决方案
查看>>
php declare(ticks=1)
查看>>
UVA 10474
查看>>
php echo 输出 锘?... 乱码问题
查看>>
PHP empty、isset、isnull的区别
查看>>
ReferenceQueue的使用
查看>>
PHP FastCGI进程管理器PHP-FPM的架构
查看>>
referenceQueue用法
查看>>
Springboot处理跨域的方式(附Demo)
查看>>
php flush()刷新不能输出缓冲的原因分析
查看>>
Referenced classpath provider does not exist: org.maven.ide.eclipse.launchconfig
查看>>
Refactoring-Imporving the Design of Exsiting Code — 代码的坏味道
查看>>