sudo

is not in the sudoers file. This incident will be reported

廉价感情. 提交于 2019-12-23 10:50:29
What 我用的是CentOS6.3,在一般用户下执行sudo命令提示 “(我的用户名) is not in the sudoers file. This incident will be reported.” How 解决方法: 一、$whereis sudoers 找出文件所在的位置,默认都是/etc/sudoers 二、#chmod u+w /etc/sudoers 以超级用户登录su ,修改文件权限即添加文件拥有这的写权限,ls -al /etc/sudoers 可以查看原文件的权限。 三、vi /etc/sudoers 编辑文件,在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX为你的用户名。添加方法:找到root行,按下”i“键进入编辑模式添加即可!编辑好后esc键进入一般模式,“:wq"保存退出! 最后, #chmod u-w /etc/sudoers 回到文件的原权限! Why 详细: 在ubuntu中由于禁用了root用户,默认情况下会把安装系统时建立的用户添加到sudoers中。但在redhat系中并没有把任何root用户之外的用户默认的添加到sudoers之中。这样我们在执行sudo 命令时就会出现xxx is not in the sudoers file. This incident will be reported

ubuntu安装caffe

爱⌒轻易说出口 提交于 2019-12-23 10:00:51
安装依赖 sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev sudo apt-get install libhdf5-serial-dev protobuf-compiler sudo apt-get install --no-install-recommends libboost-all-dev sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev 解压 wget https://github.com/BVLC/caffe/archive/1.0.tar.gz . tar -vxzf 1.0.tar.gz 复制makefile.conf文件 sudo gedit Makefile.config 将第5行注释去掉 USE_CUDNN := 1 将第21行注释 OPENCV_VERSION := 3 将第37和38行删除(cuda8.0后不再支持),也就是删 除-gencode arch=compute_20,code=sm_20 \和-gencode arch

'whoami' does not work on mac terminal

末鹿安然 提交于 2019-12-23 09:26:23
问题 When I set up Node js environment, I often encounter npm permission error, as it can't access /node-modules/. With the help of this question (npm throws error without sudo), I managed to change the ownership. However, I had to type my username, instead of 'whoami' as in the example. sudo chown -R 'whoami' ~/.npm chown: whoami: illegal user name Does it mean 'whoami' is not supported on mac, or am I doing something wrong? 回答1: You have a typo: you need to use backward ticks sudo chown -R

Why do I need Root privilege to do `git branch -a`?

僤鯓⒐⒋嵵緔 提交于 2019-12-23 09:25:10
问题 The git repository is under my username nikhil and group nikhil as follows: $ ls -l drwxr-xr-x 10 nikhil nikhil 4096 Sep 1 12:33 CS/ I can get git status as git status without root privilege. But when I try to list branches: $ git branch -a nothing happens. Also, with root priviledge: $ sudo git branch -a [sudo] password for nikhil: * master remotes/origin/feature remotes/origin/master it does lists all my repository. Why is it so? Edit: output of ls -lh .git $ ls -lh .git total 332K drwxr-xr

sudo command not found on Cygwin

左心房为你撑大大i 提交于 2019-12-23 06:48:21
问题 I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. on Cygwin - I may be wrong). However, when I try to install a package like: sudo apt-get install paparazzi-dev I get the reply: -sh: sudo: command not found. Does anyone have an idea as to how I can fix this problem? 回答1: Cygwin is not a full Linux distribution

What happens when I sudo bash -c? [closed]

狂风中的少年 提交于 2019-12-23 06:29:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I know that sudo bash -c 'some_command' will run some_command with the same privileges as sudo. I'm confused as to what's happening? Does it run some_command in bash as sudo (same as sudo bash ) then switch back to my current user? Why am I not left in an instance of bash with sudo privileges like I would when I

What happens when I sudo bash -c? [closed]

寵の児 提交于 2019-12-23 06:28:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I know that sudo bash -c 'some_command' will run some_command with the same privileges as sudo. I'm confused as to what's happening? Does it run some_command in bash as sudo (same as sudo bash ) then switch back to my current user? Why am I not left in an instance of bash with sudo privileges like I would when I

ssh environment variable for sudo access

半世苍凉 提交于 2019-12-23 05:52:07
问题 This question is another side of that question If I want to launch some command over ssh connection, I provide ~/.ssh/environment file with variables there (but it does not allow me to use bash command there..) But if I want to launch some command with sudo (like sudo java , for example), usually I put the following line to my .bashrc file alias sudo='sudo env PATH=$PATH' So, I can NOT put this alias into my ~/.ssh/environment file, because it does not support any commands. So, what it is the

ssh environment variable for sudo access

时光总嘲笑我的痴心妄想 提交于 2019-12-23 05:51:07
问题 This question is another side of that question If I want to launch some command over ssh connection, I provide ~/.ssh/environment file with variables there (but it does not allow me to use bash command there..) But if I want to launch some command with sudo (like sudo java , for example), usually I put the following line to my .bashrc file alias sudo='sudo env PATH=$PATH' So, I can NOT put this alias into my ~/.ssh/environment file, because it does not support any commands. So, what it is the

Ubuntu14.04配置Mono+Jexus

为君一笑 提交于 2019-12-23 05:32:40
  总所周知,ASP.NET是微软公司的一项技术,是一个网站服务端开发的一种技术,它可以在通过HTTP请求文档时再在Web服务器上动态创建它们,就是所谓动态网站开发,它依赖运行于 IIS 之中的程序 。但是从成本上面来讲,Linux(开源)系统的花费比Windows Server系列少得多。因此,更多的企业愿意采用Linux作为服务器系统。由于ASP.NET依赖于IIS,导致有部分创业型公司在技术选型上会将ASP.NET筛选掉。我们伟大的程序猿,为了能让ASP.NET运行在Linux系统上,Mono就应运而生了,加上Jexus服务器,使得ASP.NET跨平台部署成为现实。   安装配置Mono+Jexus,当前采用的Linux版本是Ubuntu14.04 64位。   一、更新系统       使用指令:sudo apt-get update            sudo apt-get upgrade   二、建立编译环境       使用指令:sudo apt-get install build-essential automake autoconf bison gettext libtool libglib2.0-dev libfreetype6-dev libfontconfig-dev   三、安装依赖库       使用指令:sudo apt-get install