让你的Debian普通用户能够sudo

【linux】Debian不能运行sudo的解决 出现 "sudo: 没有找到有效的 sudoers 资源,退出" 和 "sudo: 初始化审计插件 sudoers_audit 出错",这表明系统无法找到有效的 sudoers 配置文件,因此无法执行需要管理员权限的命令。文件时要非常小心,因为错误的配置可能会导致系统管理员无法使用 sudo,或者授予不应该有的权限。文件是 sudo 程序的核心配置文件,它定义了哪些用户可以执行哪些命令,以及以何种权限执行。在安装sudo之后,可以通过在用户目录下创建一个新的文件,并将其添加到sudoers。 阅读详情

刚刚装了个Debian 5。用惯了傻瓜化的Ubuntu之后真是不太习惯这种自己动手丰衣足食的系统。默认状况下普通用户是不能sudo的,必须手工修改一下。
而且默认情况下root用户是不能x中登录的,在普通用户桌面上开个终端窗口,su进入超级用户。然后运行 visudo

wpah-debian:/# visudo

默认会用nano编辑器打开文件。屏幕下方有快捷键指南。如果只想增加一个用户的sudo权限,那么在里面加上这行:

您的用户名     ALL=(ALL) ALL

如果想给所有用户都添加sudo权限,那么写成这样:

ALL          ALL=NOPASSWD:  ALL

然后按照屏幕下方提示 Ctrl+O写入文件。我写入的时候提示的文件名是sudoers.tmp,把后面的".tmp"去掉。然后 Ctrl+X退出就行了。

debian安装后sudo命令不能用的解决方法 主要介绍了debian安装后sudo不能用的解决方法,大家参考使用 立即下载

相关推荐

Icarus Verilog和GTKwave使用简析

本简要介绍Icarus Verilog和GTKwave的使用,使用iverilog(Icarus Verilog)编译仿真verilog而使用GTKWave查看仿真数据波形下载安装 基本使用 iverilog使用 GTKWave使用 iverilog常用选项 使用库 注意

husipeng86的专栏 1万+

debian安装后常见操作

虽说没人天天装系统,但是谁说得准呢,VM、esxi、 pve 、hyper 各种虚拟化平台,闲的没事瞎折腾呗。debian系统还是好用,用处也挺广,因此记录一下安装完成后常见操作.

三思的博客 2217

英飞凌 AURIX 系列单片机的HSM详解(1)——何为HSM

1. 概述 随着汽车上通信系统越来越复杂,云端远程通信的场景越来越多,信息安全变得越来越重要,在通信领域常用的AES、SHA、RSA等加密算法被越来越多地应用到汽车上。但通常这类加解密算法都需要大量的数学运算,需要消耗很多CPU时间和资源,汽车上的ECU又有比较高的实时性要求,为了节省主CPU的资源,HSM应运而生。 HSM(Hardware Security Module),是MCU上专门用于实现加解密算法的一个外设,它一般会有一个独立的CPU,专门用来进行加解密运算,还有一些针对特定算法的硬件加速器(如

weixin_42967006的博客 4万+

Debian9安装与启用sudo命令

刚安装好的Debian9默认还没有sudo功能。 1. 先进入root用户,调用下面的命令后,输入密码 $su 2. 安装sudo # apt-get install sudo 3. 不需要修改 /etc/sudoers 文件,而是在同一个目录下的/etc/sudoers.d目录下添加一个文件,如当前的用户名为user,则可在此目录下添加一个文件为user,其内容设置如下: ...

ieeso的博客 1732

新卡尝鲜记:RTX 5070Ti适配PyTorch生态的实战避坑指南

本文分享了RTX 5070Ti适配PyTorch生态的实战经验。针对CUDA 12.8兼容性问题,详细介绍了安装PyTorch Nightly版本、手动编译xformers库以及寻找PyTorch3D第三方预编译包的完整流程与解决方案,帮助用户快速搭建可用的深度学习开发环境。

weixin_29094775的博客 291

Debian(Linux)系统安装并使用sudo命令

Debian(Linux)系统安装并使用sudo命令

cheng1a的博客 7642

【VisionMaster】图像源模块之本地图像

图像采集之图像源

zhy29563 6980

【Debian系统】:安装debian系统之后,很多命令找不到,需要添加sudo之后才能使用,以下解决方法

【Debian系统】:安装debian系统之后,很多命令找不到,需要添加sudo之后才能使用,以下解决方法

嵌入式up 6003

Tesseract in Java - Intellij IDEA对Tess4J的配置和使用

最近要弄OCR,搜到这个,官网全英文,很烦,看看有没有中文的博客介绍,擦,一个比一个奇葩,还是自己按照官方的来吧,外网慢的很,传到csdn给大家下载。中文训练库下载地址: http://download.csdn.net/detail/d_dmelon/9916532Tess4J3.4下载地址: http://download.csdn.net/detail/d_dmelon/9916519安装

Lewis的博客 1万+

抓包工具:Fiddler下载、安装、使用 教程

文章目录抓包工具:Fiddler下载、安装、使用 教程一、Fiddler 下载二、Fiddler 安装三、Fiddler 使用3、Statistics 请求的性能数据分析4、Inspectors 查看数据内容5、AutoResponder 允许拦截指定规则的请求6、Composer 自定义请求发送服务器7、Filters 请求过滤规则8、Timeline 请求响应时间9、Fiddler 设置解密HTTPS的网络数据10、Fiddler 内置命令与断点 抓包工具:Fiddler下载、安装、使用 教程 Fidd

Sumarua的博客 17万+

Debian普通用户获取root权限|sudo的安装与配置

转载于:https://www.linuxidc.com/Linux/2016-04/130522.htm   Debian系统的普通用户需要安装软件时,往往会收到“Permission denied”的提示,这时候需要root权限。那么如何在不登陆超级管理员账户的前提下拥有root权限呢?对于大多数Linux系统来说,我们可以通过“sudo”命令来获取root权限,或者通过“su”登陆超级管...

Little Garden 2万+

FFmpeg入门详解之110:RTSP协议讲解

TCP/IP 协议体系中的一个应用层协议,该协议定义了一对多应用程序如何有效地通过 IP 网络传送多媒体数据。RTSP在体系结构上位于RTP和RTCP之上,它使用TCP或UDP完成数据传输。HTTP与RTSP相比,HTTP传送HTML,而RTSP传送的是多媒体数据。正在上传…重新上传取消RTSP是基于文本的协议,采用ISO10646字符集,使用UTF-8编码方案。行以CRLF中断(\r\n:10,13:0x0A,0x0D),包括消息类型、消息头、消息体和消息长。

福优学苑@音视频+流媒体 2533

Debian 普通用户无 sudo 权限问题排查与解决

在 Debian 系统中,普通用户默认不具备sudo权限,这是其核心安全策略之一。当用户尝试执行特权命令时,若收到 “user is not in the sudoers file” 的错误提示,通常由以下三个原因导致。本文将提供一套严肃、高效的排查与解决方案。

污斑兔的博客。 481

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

Debian普通用户添加sudo权限

Debian普通用户添加sudo权限 编辑 /etc/sudoers root ALL=(ALL) ALL user ALL=(ALL) ALL 用户user执行sudo时需要密码 #user ALL=NOPASSWD:ALL 用户user执行sudo时不需要密码 #user ALL=NOPASSWD:/etc/network/interfaces 用户user执行只有sudo执...

zhangjiesoft的专栏 352

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Debian、CentOS、Rocky等Linux系统配置普通用户sudo权限

配置 linux 权限是熟悉 linux 所必须的。各大linux发行版的默认软件仓库对各软件包配置了详细而严格的权限限制。如果不能熟悉 linux 的权限控制,就会因此出现很多问题。 直接使用 root 用户管理系统是非常方便的,但也是非常危险的。标准的做法是使用具有 sudo 权限的普通用户管理系统。这里记录一下在 Debian 10 系统下手动配置一个具有 sudo 权限的linux 普通用户的过程。 sudo 是较为通用的软件包,其他的 linux 发行版与 Debian 基本相同,甚至没有任何区.

qq_37184909的博客 3603

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

debian系统如何赋予普通用户sudo权限

为什么80%的码农都做不了架构师?>>> ...

weixin_33892359的博客 1240

debian linux sudo 无法执行以添加普通用户到sudo

安装debian时,默认创建了root用户,和一个普通用户; 用普通用户登录电脑,无法执行sudo命令; 查看 /etc/sudoers 无此文件; 那么说明,本机没有安装sudo   解决方式; 终端 su root 切换到root用户; #安装sudo命令 apt-get install sudo  #添加普通用户到sudoers文件 vim /etc/sudoers   # User pri...

weixin_33860737的博客 290

Debian 添加普通用户并添加sudo权限

Debian 添加普通用户并添加sudo权限 首先添加一个用户组: 1 groupadd humou 添加用户,设置主目录,shell路径 1 useradd -g humou -d /home/humou -s /bin/bash -m humou shell路径设置不对,该用户

zouyongjin的专栏 2万+

Debian启用GUI ROOT登录 和 sudo 无法执行以添加普通用户到sudo 和 SSH Connection refused 问题的解决

debian linux sudo 无法执行以添加普通用户到sudo 安装debian时,默认创建了root用户,和一个普通用户; 用普通用户登录电脑,无法执行sudo命令; 查看 /etc/sudoers 无此文件; 那么说明,本机没有安装sudo 解决方式; 终端 su root 切换到root用户; #安装sudo命令 apt-get install sudo #添加普通用户到sudoers文件 vim /etc/sudoers # User privilege spec.

qq_32421489的博客 774

Debian10下给普通用户sudo权限

进入root超级用户,找到 /etc/sudoers文件 1、为sudoers文件添加写的权限 :chmod u+w sudoers 2、编辑sudoers文件 : visudoers 3、找到如下 # User privilege specification root ALL=(ALL:ALL) ALL username ALL=(ALL:ALL) NOPASSWD:ALL //添加入上面一行,其中username为需要提升的普...

沸腾了的博客 2777
上一篇: debian下双击挂载windows分区
下一篇: 让 Apt 使用代理
java211
博客等级 码龄20年 97粉丝 43原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址