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

你可能感兴趣的文章
nginx+mysql+redis+mongdb+rabbitmq 自动化部署脚本
查看>>
nginx+php的搭建
查看>>
Nginx+Redis+Ehcache:大型高并发与高可用的三层缓存架构总结
查看>>
nginx+tomcat+memcached
查看>>
nginx+tomcat单个域名及多个域名配置
查看>>
Nginx+Tomcat实现动静分离
查看>>
nginx+Tomcat性能监控
查看>>
nginx+uwsgi+django
查看>>
nginx+vsftp搭建图片服务器
查看>>
Nginx-http-flv-module流媒体服务器搭建+模拟推流+flv.js在前端html和Vue中播放HTTP-FLV视频流
查看>>
nginx-vts + prometheus 监控nginx
查看>>
Nginx/Apache反向代理
查看>>
Nginx: 413 – Request Entity Too Large Error and Solution
查看>>
nginx: [emerg] getpwnam(“www”) failed 错误处理方法
查看>>
nginx: [emerg] the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:
查看>>
nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
查看>>
nginx:Error ./configure: error: the HTTP rewrite module requires the PCRE library
查看>>
Nginx:objs/Makefile:432: recipe for target ‘objs/src/core/ngx_murmurhash.o‘解决方法
查看>>
nginxWebUI runCmd RCE漏洞复现
查看>>
nginx_rtmp
查看>>