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

解决 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的发行版...

    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 ...

    The Linux-HA User’s Guide

    Upgrading from Heartbeat 2.1 clusters not using the CRM 6.1.1. Stopping Heartbeat services 6.1.2. Upgrade software 6.1.3. Enabling the Heartbeat cluster to use Pacemaker 6.1.4. Restarting ...

    制作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中文文档.pdf

    Osamu Aoki <osamu\#at\#debian.org> 译者: Hao “Lyoo” Liu Ming Hua <minghua\#at\#rice.edu> 肖盛文<atzlinux\#at\#163.com> Haifeng Chen <optical.dlz\#at\#gmail.com> 解彦博<xieyanbo\#at\#gmail.com> ...

    The Debian Adminstrator's Handbook

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

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

    Debian日常应用和系统管理很好的参考手册,用于系统学习或遇到问题查找参考都适合。有目录索引可以定位,可以文字搜索查找。

    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...

    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.时可能用到

    The Debian Administrator’s Handbook.pdf

    The Debian Administrator’s Handbook,debian.org官方推荐参考文档,页码重新编排过了,可以在acrobat里直接输入目录里的页码,跳转到相应的页面。

    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 ...

    libjasper1_1.900.1-debian1-2.4+deb8u3_amd64.deb

    解决深度系统v15中无法安装libjasper1的问题,直接下载安装即可。原始的网址为:http://ftp.br.debian.org/debian/pool/main/j/jasper/libjasper1_1.900.1-debian1-2.4+deb8u3_amd64.deb

    mysql-server_8.0.25-1debian10.zip

    适用于Debian Linux 10 (x86, 64-bit) 压缩包内容: mysql-community-server_8.0.25-1debian10_amd64.deb、 mysql-community-server-core_8.0.25-1debian10_amd64.deb、 mysql-community-server-core-dbgsym_8.0.25-...

    虚拟机黑屏end kernel panic - not syncing两种解决方式.docx

    虚拟机黑屏end kernel panic - not syncing两种解决方式 最新的Ubuntu或Debian安装新虚拟机,或者复制别人安装好的虚拟机,出现黑屏,屏幕上提示kernel panic错误: end kernel panic - not syncing: corrupted ...

Global site tag (gtag.js) - Google Analytics