ubuntu的sudo失效的问题

Ubuntu系统修复因误改libc.so.6软链接导致的sudo命令失效问题 本文详细讲解了因误修改Ubuntu系统中libc.so.6等核心库软链接导致sudo等命令失效的故障原理与修复方法。文章深入分析了glibc库的关键作用,解释了系统崩溃的根本原因,并提供了从内部尝试修复到最终使用Ubuntu安装U盘进行系统级修复的完整、可靠的解决方案。最后总结了避免此类问题的核心原则与安全升级Glibc的正确姿势。 阅读详情

问题出现:

    昨天服务器上有人在装软件,今天来发现sudo不能使用了,具体现象如下:

    【错误信息】sudo: must be setuid root

解决办法:

    从错误信息来看,应该是普通用户无法执行sudo这个程序,所以给它添加权限

    chmod 4755 /usr/bin/sudo,使得其他用户执行这个程序时同样具有根用户权限

 

进一步的问题:

    【错误信息】sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner

    【错误信息】sudo: fatal error, unable to load plugins

解决办法:

    从错误信息来看,是提示sudoers.so这个动态库除了拥有者之外,不应该有写权限,所以

    执行chmod 755 /usr/lib/sudo/sudoers.so

 

测试问题解决情况:

    usage: sudo [-D level] -h | -K | -k | -V
    usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid]
    usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command]
    usage: sudo [-AbEHknPS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
    usage: sudo -e [-AknS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ...

 

【以上打印信息显示,sudo可以正常使用了】 

TP4056锂电池充电电路设计原理与工程实践 锂离子电池充电管理是嵌入式电源系统的核心基础技术,其本质是通过恒流恒压(CC/CV)控制策略,匹配电池电化学特性以实现安全、高效、长寿命充放电。TP4056作为典型线性充电IC,以精简外围实现预充、恒流、恒压及自动截止全周期管理,但受限于线性拓扑的热耗散特性,必须协同散热设计、电阻精度选型与PCB布局进行系统级优化。该方案广泛应用于STM32智能小车、便携传感器节点等3.7V单节锂电供电场景,兼顾成本、可靠性与工程可实施性,是入门嵌入式硬件电源设计的关键实践范例。 阅读详情

相关推荐

DMA+Timer 生成 PWM 波形错位问题分析与解决

本文深入分析了DMA与Timer协同生成PWM波形时出现的错位问题,揭示了DMA传输启动时机与定时器溢出中断的微妙关系。通过占空比强制清零法和预装载值调校技巧,提供了有效的解决方案,并总结了PWM+DMA配置的最佳实践,帮助开发者避免类似问题。

weixin_29191081的博客 348

sudo: fatal error, unable to load plugins解决办法

错误信息: sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins 查了一下,是某些文件的权限被修改了所以不行,要改回440。 看了一下错误信息,觉得应该是usr目录下的 /usr/lib/sudo

qq_41176921的博客 5202

保姆级教程:用Python 3.10和Ollama在Windows上搞定LightRAG本地部署(附环境配置避坑指南)

本文提供了一份详细的Windows系统下LightRAG本地部署指南,涵盖Python 3.10环境配置、Ollama模型服务安装到LightRAG核心组件部署的全流程。特别针对Windows平台常见问题提供解决方案,帮助开发者快速搭建高效的检索增强生成(RAG)系统,实现专业领域知识的智能检索与整合。

weixin_28725407的博客 483

hadoop用户和root用户所用sudo命令报错

[root@master Desktop]# sudo sudo: /usr/libexec/sudoers.so must be owned by uid 0 ##必须由 uid 0 拥有 sudo: fatal error, unable to load plugins ##致命错误,无法加载插件这里提一下:UID---用户标识号,

ghw666666666的博客 1919

高分辨率航拍图像的目标检测切图优化策略

本文深入探讨了高分辨率航拍图像目标检测中的切图优化策略。针对大尺寸图像直接缩放导致小目标信息丢失的问题,文章详细阐述了基于重叠切割的核心方法,包括如何根据目标尺寸确定切图尺寸与重叠率,并提供了从切图到坐标还原的完整代码实现与避坑指南,有效提升检测精度与效率。

xk7n92h3p5m的博客 1113

SAP各模块表清单及逻辑关系介绍

分享韩国同行总结的各模块的表清单及逻辑关系,这对ABAP顾问和各模块业务顾问应该非常有用的 物料主数据 SD与MM PS模块 PP模块 QM模块 CO模块 FI模块

weixin_40672823的博客 9599

解决烦人的sudo报错问题

  当在终端输入sudo XXXX 显示如下信息 sudo: /etc/sudo.conf is world writable sudo: /etc/sudo.conf is world writable sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal

weixin_43820951的博客 1万+

保姆级教程:用中移ML307模组对接高德/OneOS定位服务,从配置apikey到解析+MLBSLOC状态码

本文详细介绍了如何使用中移ML307系列模组对接高德/OneOS定位服务,从配置apikey到解析+MLBSLOC状态码的全过程。涵盖高德定位服务和OneOS定位服务的配置步骤、常见错误处理及性能优化技巧,帮助开发者快速实现基站定位功能,提升物联网项目的定位精度和稳定性。

weixin_30632089的博客 507

执行sudo报错:sudo: error in /etc/sudo.conf, line 19 while loading plugin “sudoers_policy“报错解决

执行sudo报无法打开共享对象文件libssl.so.10,问题解决。 sudo: error in /etc/sudo.conf, line 19 while loading plugin “sudoers_policy” sudo: unable to load /usr/libexec/sudo/sudoers.so: libssl.so.10: cannot open shared object file: No such file or directory sudo: fatal error, u

看着博客敲代码 8780

SMPTE ST 2110 概论(三)

SMPTE ST 2110 概论(三)ST 2110-30:未压缩的PCM音频流ST 2110-31:非PCM音频传输ST 2110-40:辅助数据传输结语 ST 2110-30:未压缩的PCM音频流 鉴于音频系统是广播系统中最复杂,也是最重要的一套系统,我们先来回顾一下广电音频系统的历史。 最老式的音频都是基于模拟信号的,具有有限的动态范围,并且用连续的电压变化来描述音频。再后来就基于数字信号(...

Cidd0422的博客 1万+

控制科学与工程(自动化)保研经验【4】——浙大篇

控制科学与工程(自动化)保研经验【4】——浙大篇

Control Everything 1万+

sudo使用出错

今天不小心做了个死: sudo chmod -R 777 /usr/lib然后sudo立即不能用了,错误信息: sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy' sudo: /usr/lib/sudo/sudoers.so must be only be writable by own

tinnu的博客 7661

eCognition易康操作教程(一):如何利用eCognition易康软件进行影像分割之棋盘分割、四叉树分割、光谱差异分割

进程执行完成后,植被覆盖区域与裸地区域合并了。第三步:清除分割结果,点击“Image Objects”菜单栏,点击“Delete Level(s)”,选中“ResultLevel1”,点击”ok”删除棋盘分割结果。四叉树分割之后,有的正方形大一些,有的正方形小一些,大说明该区域的光谱特性更加均一,而小说明不太均一。Leve:选择运行算法的矢量层名称,这里选择四叉树分割算法得到的矢量层“ResultLevel2”。Image Layer weights:图层权重,这里设置为“1,1,1,1”。

蒹葭苍苍 4608

Ubuntu执行sudo apt update失效,更换源问题

Ubuntu执行sudo apt update失效,更换源问题

Java 领域技术分享 329

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

[异常解决] ubuntu上安采用sudo启动的firefox,ibus输入法失效问题解决

  采用sudo启动的应用是root权限的应用, ibus失效是因为ibus的初始配置采用user权限: 而root下运行的firefox输入法的配置还是停留在默认情况~ 解决方案是在shell下以root权限运行ibus,然后进行配置: 1、shell下输入:sudo ibus-setup (一定要加sudo,否则和直接点击menu上的preferences效果一样) 2、在弹出...

weixin_34174105的博客 493

深度学习工具包 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")

linux sudo命令不识别,Ubuntu 7.10中sudo命令不可用的解决方法

今天进入Linux系统(Ubuntu 7.10)后,突然出现了好几个问题:1、一是声卡没有作用了。2、没有办法使用sudo命令。觉得很奇怪,还以为中了病毒呢。但是想想这个是Ubuntu,不可能那么容易就中招了,何况现在针对Linux的病毒本来就很少。于是到网上查了查,发现有不少人也遇到了类似的情况。在使用sudo命令的时候的提示如下:fafa211 is not in the sudoers fi...

weixin_42601547的博客 1230

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

sudo命令不可用的解决方法

今天进入Linux系统(ubuntu 7.10)后,突然出现了好几个问题:1、一是声卡没有作用了。2、没有办法使用sudo命令。觉得很奇怪,还以为中了病毒呢。但是想想这个是ubuntu,不可能那么容易就中招了,何况现在针对Linux的病毒本来就很少。于是到网上查了查,发现有不少人也遇到了类似的情况。在使用sudo命令的时候的提示如下:fafa211 is not in the sudoers fi

phphot 2754

ubuntu下sudo不能使用

ubuntu 下sudo 不能使用,因为在给根目录解除权限的时候,使用sudo命令给根目录下全部文件夹路径解除权限,然后sudo失效,所以不要给根目录所有文件夹解除权限。首先ubuntu启动时,按住shift键,进入高级模式,进入recover模式。根据以上每次输入sudo 出现的错误,一次修改权限。到此问题解决,特此记录,有需要的网友可以参考。结合网友的博客,找到如下修复方式。再次ls 发现权限已经改过来了。

湮没 2381

linux sudo 命令无法使用,Linux_Ubuntu下Sudo命令不可用的解决方法,在使用sudo命令的时候的提示如 - phpStudy...

Ubuntu下Sudo命令不可用的解决方法在使用sudo命令的时候的提示如下:fafa211 is not in the sudoers file.但是显然的,之前是能用的,也就是说之前fafa211应该是在/etc/sudoers中的。cat /etc/sudoers发现居然没有权限看这个文件。只有属于admin组的用户才可使用sudo命令。使用:cat /etc/group|grep admi...

weixin_32503361的博客 431

sudo命令的补全(bash completion with sudo in Ubuntu8.04)

Linux中的命令行补全是我们经常使用的一项伟大的技术。虽然看资料上说最初命令行补全只是支持一些系统命令的补全,可用应该相当于$PATH中的软件的一个列表。到本人使用Linux的时候却已经实现了命令参数的补全,不得不说这是命令补全一次质的提升。原本你输入v,按两次TAB,也就是提示你vi,vim,view...等可用的命令,加入参数补全后你输入命令后两次TAB,则出现可用的参数,例如前面的如果你选

我的菜地~~ 2070

ubuntu下修改environment后无法使用sudo的解决办法

转载请注明:http://hanlaiming.freetzi.com/?p=111 今天傻傻的修改了ubuntu12.04下的/etc/environment,将其中的usr/bin删掉了,结果导致sudo和好多命令用不了,而且关键是修改这个environment文件需要sudo权限,所以很尴尬。 网上推荐的办法是进入recovery模式进行指令调整,但是很麻烦,在镔哥的帮助下,我学

summerhai 1430

Ubuntu 18.04 sudo用户权限失效的四大根源与修复

sudo 是 Linux 系统中实现特权访问控制的核心机制,其工作原理依赖于用户组归属、/etc/sudoers 配置、setuid 文件权限及安全环境变量(如 secure_path)四重协同。理解这一链路对排查‘user not in sudoers file’或‘command not found’等高频问题至关重要。技术价值在于避免误操作导致的权限中断,提升系统可维护性与审计合规性。典型应用场景包括 Ubuntu 18.04 服务器运维、Jetson Nano 嵌入式开发、Vagrant 虚拟化环境

aodanchui1057的博客 392

Ubuntu使用sudo命令出现must be setuid root错误的解决方法

Ubuntu使用sudo命令出现must be setuid root错误的解决方法今天不小心使用命令sudo chmod -R 777 /usr结果悲剧了,sudo命令失去了作用,报错:must be setuid root。于是搜了很多博客,不能说他们的方法不对,但是都没彻底解决我的问题,最后把几篇文章综合起来,终于解决了问题。解决步骤:我的系统是Ubuntu 12.04 Desktop1.重启

Crazy_CPU的博客 2621
上一篇: android源码下载
下一篇: 如何下载chrom store的应用
xiaohuan_study
博客等级 码龄15年 9粉丝 36原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值