原文链接: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. Tinyplay

    android里面的目录:external/tinyalsa 编译: 1. cd external/tinyalsa/ 2. vi Android.mk 3. mmm . 4. 拷贝出可执行文件 执行 ...

  2. JAVA 中的堆和栈

    栈与堆都是Java用来在Ram中存放数据的地方.与C++不同,Java自动管理栈和堆,程序员不能直接地设置栈或堆.     Java的堆是一个运行时数据区,类的对象从中分配空间.这些对象通过new.n ...

  3. PHP错题误区

    1,$bool = TRUE;echo gettype($bool);  //这个输出类型:booleanecho is_string($bool);  //这个用echo是不能输出布尔型的,只有va ...

  4. python--numpy模块、spicy模块、 matplotlib模块

    一:numpy模块 ndarray:存储单一数据类型的多维数组 ufunc:能够对数组进行处理的函数(universal function object) #numpy 中arange用法,指定开始值 ...

  5. Servlet中init-param与context-param的区别

    web.xml文件中Servlet中配置如下: <servlet> <servlet-name>loginServlet</servlet-name> <se ...

  6. 把myeclipse中html/jsp文件的视图调到只看代码

    烦恼———————————————————— 解决方法: ok---------------------------- *.jsp 同理

  7. 洛谷P3960 列队(Splay)

    传送门 感觉自己好久不打数据结构已经完全不会了orz…… 据说正解树状数组?然而并不会 首先考虑一下每一次操作,就是把一个人从这一行中取出并放到行的最后,再从最后一列取出放到列的最后 那么这两种操作其 ...

  8. [Xcode 实际操作]八、网络与多线程-(15)使用网址会话对象URLSession下载图片并存储在沙箱目录中

    目录:[Swift]Xcode实际操作 本文将演示如何通过网址会话对象URLSession下载图片并存储在沙箱目录中. 网址会话对象URLSession具有在后台上传和下载.暂停和恢复网络操作.丰富的 ...

  9. IT兄弟连 JavaWeb教程 JSP中的三大指令

    指令标识主要用于设定整个JSP页面范围内都有效的相关信息,它是被服务器解释并执行的,不会产生任何内容输出到网页中.也就是说,指令标识对于客户端浏览器是不接见的.JSP页面的指令标识与我们的身份证类似, ...

  10. perl 操作文件指针

    之前使用perl 脚本写了一个读取文件的小工具,但是由于当时使用的Tie 的方式,在处理大文件时,效率并不十分理想,所以在网上搜索了perl 如何操作文件指针的文章,自己也学习一下,本博客就是学习过程 ...