`
as619864232
  • 浏览: 324245 次
社区版块
存档分类
最新评论

解决 Debian 中的 xxx is not in the sudoers file.(转)

阅读更多

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。下面是修改方 法:


1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用) 
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。 
3) 编辑/etc/sudoers文件。也就是输入命令"vi /etc/sudoers",输入"i"进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存(就是先按一 下Esc键,然后输入":wq")退出。 
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。
分享到:
评论

相关推荐

    ansible-sudoers:在类似Debian的系统中管理sudoers和sudoers.d的角色

    在类似Debian的系统中管理sudoers和sudoers.d。 要求 没有任何 变数 sudoers_sudoers : /etc/sudoers文件声明 sudoers_sudoers.defaults :[默认:请参见defaults/main.yml ]:默认配置选项 sudoers_sudoers.host_...

    Armbian_5.44_S9xxx_Ubuntu_bionic_3.14.29_server_20180729.img.xz

    Armbian_5.44_S9xxx_Ubuntu_bionic_3.14.29_server_20180729.img.xz 数码视讯Q5 armbian系统镜像,测试正常

    debian-handbook.pdf

    Debian is a very successful operating system, which is pervasive in our digital lives more than people often imagine or are aware of. A few data points will suffice to make this clear. At the time of ...

    Ubuntu/Deepin下Python3.8出现SSL错误的解决方案

    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 网上的方法都是在CentOS下进行的,而我用的是Deepin系统,也就是基于Ubuntu/Debian的发行版...

    Debian系统管理员参考手册 The Debian Administrator’s Handbook

    总之,《Debian系统管理员参考手册》是Debian系统管理员不可或缺的资源,它不仅详尽地介绍了Debian系统的基础和高级特性,还提供了丰富的实践案例和管理技巧,是帮助管理员有效管理Debian系统和解决问题的宝贵工具。

    The Debian Administrator's Handbook.epub

    The Debian Administrator's Handbook will guide you on your way to autonomy. It could only be written by authors who master both the technical aspects and the inner workings of the Debian project, and ...

    Debian The Perfect Setup.chm

    Debian The Perfect Setup.chm

    debian软件包sources.list

    # A network mirror was not selected during install. The following entries # are provided as examples, but you should amend them as appropriate # for your mirror of choice. # deb ...

    制作debian的rootfs

    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # ...

    安裝 嘸蝦米輸入法 於 Debian-Ubuntu(SCIM).pdf

    根据给定文件的信息,本文将详细介绍如何在Debian或Ubuntu系统中安装嘸蝦米(Liu)输入法,并确保其与SCIM (Smart Common Input Method) 兼容。 ### 安装嘸蝦米(Liu)输入法于 Debian/Ubuntu (SCIM) #### 一、...

    ca-certificates_20190110_18.04.1_all.deb

    ubuntu18.04对应ca-certificates包。apt update报错Certificate verification failed: The certificate is NOT trusted.... Could not handshake: Error in the certificate verification.时可能会用到

    The Debian Adminstrator's Handbook

    Debian系统管理员的手册,内容非常丰富。更新到了 Debian 7。epub 格式适合在移动设备上阅读。这本书的网站上(http://debian-handbook.info/)有pdf版本。

    The Debian Administrator’s Handbook.pdf

    该手册是由Debian官方推荐的参考文档,广泛用于系统管理员和Debian用户的日常操作和问题解决。 书中首先介绍了Debian项目的基础信息。Debian是一个多平台的操作系统,它不仅支持常见的x86架构,还包括了其他多种...

    Debian 6中文乱码解决方案.docx

    Debian 6 中文乱码解决方案 文档概述 本文档提供了 Debian 6 中文乱码解决方案,旨在帮助用户解决 Debian 6 中文乱码问题。该解决方案分为四个步骤,分别是将宋体或新宋体复制到/usr/share/fonts/truetype/目录下...

    Ansible-ansible-swapfile.zip

    Ansible-ansible-swapfile.zip,在类似于debian的systemsswapfile中管理交换文件的责任角色,ansible是一个简单而强大的自动化引擎。它用于帮助配置管理、应用程序部署和任务自动化。

    testlink_1.9beta1

    For example there is the same application tested under Ubuntu, Debian and Fedora. Users can see metrics for all these platforms separatelly. Metrics are more accurate. We solved inconsistence for the...

    MegaCli8.07.10.tar.gz

    <Lib_Utils-1.xx-xx.noarch.rpm> and <Lib_Utils2-1.xx-xx.noarch.rpm> are packaged in the MegaCli zip file. To install the <Lib_Utils-1.xx-xx.noarch.rpm> and <Lib_Utils2-1.xx-xx.noarch.rpm>, please ...

    debian编译安装php7.4.30.txt

    debian编译安装php7.4.30.txt 编译安装更稳定! 每一行复制执行即可完成安装!

    libssl1.1_1.1.1-1ubuntu2.1_18.04.6_amd64.deb

    ubuntu18.04的libssl包。apt update报错Certificate verification failed: The certificate is NOT trusted. The certificate issuer is ... Could not handshake: Error in the certificate verification.时可能用到

Global site tag (gtag.js) - Google Analytics