On Wednesday 2023-08-16 01:18, Aaron Puchert wrote:
Am 15.08.23 um 11:36 schrieb Jan Engelhardt:
sbin: "system programs and administration utilities"
That was the idea in the early UNIX days, but it's becoming unusual to log in as root, and administrative work is mostly done from regular accounts with the occasional use of sudo.
sudo is not affected by your PATH. `sudo getcap` still works. Your shell might not see that in tabbing, but that's just one of the many problems with a suid tool in an unprivileged shell, "sudo something >>/etc/protectedfile" being one of those. Just use `sudo bash` and move on.
So while getcap is certainly an administrative tool, it doesn't (ever?) require additional capabilities, so there is (never?) a need to run it as root.
Just because you can run mkfs.xfs as a normal user does not make it very useful, unless perhaps you are trying to debug xfsprogs itself. It's just nowhere near the commonality of /bin/ls.
Alternatively, would you suggest an "administrator" add /usr/sbin to their PATH for the tools that don't actually need privileges? But many of us are effectively administrators these days.
Yes, change your PATH if you think that is useful for your case. Or do the experiment on yourself and just type out /usr/sbin/ in front and then count how often you needed it. With UsrMerge, you can now just use /sbin (less typing).