The officially official Devuan Forum!

You are not logged in.

#1 Yesterday 10:01:33

kapqa
Member
Registered: 2019-01-02
Posts: 764  

Changes in sudo (upstream)

This was today in the "news"

sudo (1.9.17p2-7) unstable; urgency=medium

   Starting with sudo 1.9.17p2-6, the default /etc/sudoers was aligned with
   the example file that upstream ships. This was done to reduce the
   differences between Debian and other distributions.

   This has removed /usr/local/sbin and /usr/local/bin from the
   "Defaults secure_path" setting. This may break some local scripts, but
   also increases security, since on some systems, /usr/local might be
   writable for non-root users and thus executing programs from there might
   introduce privilege escalation.

   If you want to use executables from /usr/local with sudo without giving
   the explicit path, consider changing the setting in an /etc/sudoers.d
   snippet.

-- Marc Haber <mh+debian-packages@zugschlus.de>  Sat, 04 Jul 2026 12:57:42 +0200

have not fully understood the implicatoins of change, but suppose it is a benevolent, sensible change.

Online

#2 Yesterday 21:54:11

tux_99
Member
Registered: 2025-06-17
Posts: 147  

Re: Changes in sudo (upstream)

sudo is one of the first packages that I uninstall on laptops/desktops after a fresh installation.

It is not even meant for the purpose it's being used by most Linux distros, sudo is meant to give limited access to specific commands as root or other restricted user to specific users on a multi-user system, not as a "run everything you want as root" tool on a single user desktop/laptop system.

We have to thank Ubuntu for introducing this misuse of sudo on Linux.

Last edited by tux_99 (Yesterday 21:55:27)


Either the users control the program – or the program controls the users” Richard Stallman

Offline

#3 Yesterday 23:04:45

Altoid
Member
Registered: 2017-05-07
Posts: 2,108  

Re: Changes in sudo (upstream)

Hello:

tux_99 wrote:

... as a "run everything you want as root" tool on a single user desktop ...

Not the way I use it, mostly thanks to my learning about it when on PCLinuxOS.
One of the main admins was quite adamant about it.
See: https://pclosmag.com/html/Issues/201205/page11.html

But yes, I agree that a great many people use it in the wrong way.
Mainly thanks to the Ubuntu distribution.

I am, of course, also interested in the implications of the announced change.

Best,

A.

Offline

#4 Today 00:00:09

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,987  

Re: Changes in sudo (upstream)

What is says is that if you want to use sudo to run a command in /usr/local/(s)bin, you must now give the full path to the command.

What I see is that I do not have to give the full path to run the command with sudo, but maybe that's because I have the full path to the command already in my /etc/sudoers.d/usercommands. So for me, there's no change. Tested this in freia with the version of sudo mentioned above.

Offline

#5 Today 01:18:03

greenjeans
Member
Registered: 2017-04-07
Posts: 1,761  
Website

Re: Changes in sudo (upstream)

Wait, some of you are still using sudo?


https://sourceforge.net/projects/vuu-do/ Vuu-do GNU/Linux, Devuan-based Openbox systems.
Devuan 6 mate-mini iso, pure Devuan, 100% no-vuu-do. Now with Xlibre as well.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
https://devuanusers.com/ Apps source : https://git.devuan.org/greenjeans

Offline

#6 Today 01:30:33

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,987  

Re: Changes in sudo (upstream)

Yeah, I have sudo NOPASSWD set for a few commands for one user. That's all.

Offline

#7 Today 02:11:30

Mercury
Member
Registered: 2024-11-14
Posts: 50  

Re: Changes in sudo (upstream)

What is the "proper" way to run admin tasks? For example, what "should" I be using to edit system-wide conf files?

Offline

#8 Today 09:24:31

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,987  

Re: Changes in sudo (upstream)

It's linux. There are 10 ways to do anything. Pick one.

If you have a root account, you can su to root to do admin tasks. If you don't have a root account, you need to use sudo to do admin tasks, and in that case, you're probably a member of the sudo group and can do anything with it.

The original intent of sudo was to allow fine-grained permissions for certain users or groups to do a few specific admin tasks rather than give them total root access.

What you should not do is log into a desktop session as root.

Offline

#9 Today 10:41:54

Altoid
Member
Registered: 2017-05-07
Posts: 2,108  

Re: Changes in sudo (upstream)

Hello:

fsmithred wrote:

... to run a command in /usr/local/(s)bin, you must now give the full path ...

Right, thanks for that.

fsmithred wrote:

... have the full path to the command already in my /etc/sudoers.d/ ...

fsmithred wrote:

... sudo NOPASSWD set for a few commands.

That is how I have it set up.

Best,

A.

Offline

#10 Today 16:34:18

greenjeans
Member
Registered: 2017-04-07
Posts: 1,761  
Website

Re: Changes in sudo (upstream)

I don't know about a proper way, but on a single-user system i've always just used su. I have right-click extensions to edit a file as root, or to open a directory as root if I need to move some files around.

As far as the changes to sudo, what systems would make /usr/local/ writeable for a non-root user? That seems silly.

@Altoid that link was a blast from the past, I remember when Old Polack wrote it, PCLOS was really popular at the time and there had been a steady influx of new users posting "where's muh sudo?". OP was a brilliant guy, don't know if he's still around but I learned a lot from him.

Last edited by greenjeans (Today 16:47:38)


https://sourceforge.net/projects/vuu-do/ Vuu-do GNU/Linux, Devuan-based Openbox systems.
Devuan 6 mate-mini iso, pure Devuan, 100% no-vuu-do. Now with Xlibre as well.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
https://devuanusers.com/ Apps source : https://git.devuan.org/greenjeans

Offline

#11 Today 17:43:57

Altoid
Member
Registered: 2017-05-07
Posts: 2,108  

Re: Changes in sudo (upstream)

Hello:

greenjeans wrote:

... a blast from the past ...
... when Old Polack wrote it, PCLOS was really popular at the time ...

Quite so ...

greenjeans wrote:

... a brilliant guy, don't know if he's still around ...

Yes, I agree.

It seems that there was a fire/accident that took down the servers and a new forum had to be set up.
Apparently some stuff was lost and I cannot log-in or recover my PW.
Will try again when I have time.

Don't understand ...
No reliable off-site back-ups? 8^°

In any case, Texstar [main dev] posted this earlier this year.
Seems he does not have contact information for one of his forum's senior admin. (?)
Go figure ...

Best,

A.

Offline

Board footer