博客
关于我
用户名不在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/

你可能感兴趣的文章
python | awswrangler,一个高效的 Python 库!
查看>>
python | bashplotlib,一个有趣的Python库!
查看>>
python | bentoml,一个超级厉害的 模型部署 Python 库!
查看>>
python调用jar包的模块_python调用jar包
查看>>
python | black,一个神奇的 代码格式化工具 Python 库!
查看>>
python | bleach,一个超强的 Python 库!
查看>>
python | cartopy,一个有趣的 Python 库!
查看>>
python | cloud-init,一个实用的 云计算 Python 库!
查看>>
python | code2flow,一个神奇的 Python 库!
查看>>
python | cudf,一个超实用的 Python 库!
查看>>
python | daphne,一个非常nice的 Python 库!
查看>>
python调用halcon
查看>>
python | doit,一个非常实用的 Python 库!
查看>>
python | easyocr,一个超厉害的 关于OCR的 Python 库!
查看>>
python | fastFM,一个高级的 Python 库!
查看>>
python | feature_engine,一个实用的 Python 库!
查看>>
python | filelock,一个超酷的 Python 库!
查看>>
python | fire,一个强大的 Python 库!
查看>>
python | flanker,一个神奇的 Python 库!
查看>>
python | flower,一个强大的 Python 库!
查看>>