Linux下is not in the sudoers file解决方法
来源:互联网 发布:slack for mac 编辑:程序博客网 时间:2024/06/05 05:57
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
下面是解决方法:
1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -”命令将环境变量也一起带过去,就象和root登录一样)
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)编辑/etc/sudoers文件。也就是输入命令"gedit /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"www_linuxidc_com ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。
0 0
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“xxx is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- linux下遇到xxx is not in the sudoers file
- C语言条件编译及编译预处理阶段
- 一时间安检通道被粉丝及路人挤得满满当当
- AKKA: missing or invalid dependency detected while loading class file 'ActorSystem.class'
- hadoop系列学习之合并文件后放入HDFS中
- 与粉丝道别之后前往安检登机
- Linux下is not in the sudoers file解决方法
- 2-2-3 嵌套和级联的判断-比较数的大小(从2个数比较到3个数)?
- UML类图和对象图
- java解惑之表达式之谜(谜题2)
- mkdir -p 参数,可以直接创建层级的目录,不需要创建一个进入一个
- 【连通图|强连通+缩点】POJ-2186 Popular Cows
- LEETCODE: Partition List
- angularJS的输入验证
- 剑指offer 面试题33 数组组合的最小数