原文链接:http://sharadchhetri.com/2013/08/07/sudo-command-not-found-debian-7/

To solve this issue install sudo in Debian,follow the given below steps

Step 1: First you have to become super user (root)

su -

Step 2: Now install sudo with the help of command apt-get

apt-get install sudo

Step 3: Now check the sudo

root@debian:~# exit
logout
linux@debian:~$ sudo su - We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things: #1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility. [sudo] password for linux:
linux is not in the sudoers file. This incident will be reported.
linux@debian:~$

Note: user name linux is not listed in sudoers file hence to allow the user called linux to use “sudo su -“. We will edit the sudoers file

Important note: With sudoers file you can also specify which particular commands a particular user or group can use.

Step 4: Allowing user to use “sudo su -”

Because in my system user called linux is first user.I want to give access of super user to this account.

switch to superuser root

linux@debian:~$ su -
Password:
root@debian:~#

Edit the /etc/sudoers file: Append the below given line in sudoers file.
Replace the user name called linux with your user name. save and exit

vi /etc/sudoers

linux   ALL=(ALL:ALL) ALL

Step 5: Now recheck. Exit from console and login with user and use the command sudo su –

root@debian:~# exit
logout
You have mail in /var/mail/linux linux@debian:~$ sudo su -
[sudo] password for linux:
root@debian:~#

debian中sudo无法使用问题的更多相关文章

  1. 解决debian中脚本无法使用source的问题

    #!/bin/sh source scripts/common.sh 现象: shell脚本中source aaa.sh时提示 source: not found 原因: ls -l `which s ...

  2. Debian中安装使用sudo命令

     Debian中安装使用sudo命令  sudo可以让非root用户具有管理员的权限,安装好的Debian后还不能使用sudo,需要使用root用户登陆后安装sudo命令.#apt-get insta ...

  3. Debian中编译内核

    转载: http://blog.163.com/libo_5/blog/static/156968520101016102051580/ http://hi.baidu.com/wg_wang/ite ...

  4. 在Debian中安装VMware Workstatption 12

    在Debian中安装VMware Workstatption 12-----------------------------------------------> 下载文件:    *vmwar ...

  5. linux中hive无法使用删除键或无反应

    用的工具secureCRT连接linux服务器的,登录到hive中后无法使用删除键. 修改如下: 会话选项 -> 终端|仿真 ->  选择终端为linux.

  6. Debian中CodeIgniter+nginx+MariaDB+phpMyAdmin配置

    本文不讲述软件安装过程,记述本人在Debia中配置CodeIgniter时遇到的问题及解决方法,希望能够为有需要的人提供帮助. 一.Debian版本及所需的软件 Debian 9.8 stretch ...

  7. UEditor在开发环境中正常运作,但是部署到Tomcat中却无法使用

    背景 ​ SpringBoot项目,在 JSP 中使用 UEditor 问题 ​ UEditor 在开发环境中正常运作,但是导致部署到 Tomcat 中却无法使用 原因 在开发环境中,路径不够严谨,多 ...

  8. debian中添加sudo命令

    解决方法(root命令) apt-get install sudochmod u+w /etc/sudoers //给此文件增加写入权限gedit /etc/sudoers找到root ALL=(AL ...

  9. debian中默认不存在sudo命令解决方法

    原创 2016年09月04日 21:44:14 5664 1.使用su安装sudo $su #apt-get install sudo 1 2 2.给账户设置管理员权限 #vim /etc/sudoe ...

随机推荐

  1. Ubuntu 16.04 安装wine

    1.安装源       sudo add-apt-repository ppa:wine/wine-builds       sudo apt-get update 2.安装wine      sud ...

  2. tetrahedron

    题意: 求解一个四面体的内切球. 解法: 首先假设内切球球心为$(x0,x1,x2)$,可以用$r = \frac{3V}{S_1+S_2+S_3+S_4}$得出半径, 这样对于四个平面列出三个方程, ...

  3. 性能测试之Jmeter学习(三)

    一.Jmeter执行顺序规则: 元件执行顺序的规则很简单,在同一作用域名范围内,测试计划中的元件按照如下顺序执行. (1)配置元件(config elements ) (2)前置处理程序(Per-pr ...

  4. Asset Catalog Help (六)---Adding OS X Icons

    Adding OS X Icons Simplify image management by storing your OS X icons in an asset catalog. 把OS X图标存 ...

  5. Flutter实战视频-移动电商-50.持久化_shared_preferences

    50.持久化_shared_preferences 当app关掉了.再进去的时候 ,购物车的内容还是存在. sqflite提供这个来操作SQLite数据库 flutter提供三种持久化的工具 今天要学 ...

  6. UVa 10214 Trees in a Wood. (数论-欧拉函数)

    题意:给定一个abs(x) <= a, abs(y) <= b,除了原点之外的整点各有一棵树,可以相互阻挡,求从原点可以看到多少棵树. 析:由于a < b,所以我们可以一列一列的统计 ...

  7. win7 mongod不是内部命令

    1.下载MongoDB 1.1 MongoDB下载 1.2 选择Server下面的 Community 2.安装MongoDB 2.1 注意事项:一直下一步就行了,但是遇到下面这个界面,注意一定要去掉 ...

  8. 【OpenJ_Bailian - 2287】Tian Ji -- The Horse Racing (贪心)

    Tian Ji -- The Horse Racing 田忌赛马,还是English,要不是看题目,我都被原题整懵了,直接上Chinese吧 Descriptions: 田忌和齐王赛马,他们各有n匹马 ...

  9. linux ping

    ping [ -d] [ -D ] [  -n ] [  -q ] [ -r] [ -v] [  -R ] [ -a addr_family ] [  -c Count ] [ -w timeout ...

  10. VLAN-5-802.1Q-in-Q隧道

    Q-in-Q允许SP在跨越WAN服务时,保留802.1Q VLAN标签.由此,VLAN可以被拓展到多个地理分散的站点上.     入向SP交换机收到802.1Q数据帧,使用额外的802.1Q头部来标记 ...