On LowEndTalk, we’ve been having a conversation about how the venerable sudo command is coming to Windows. Personally, I think that’s a bit weird. Not that Windows might need some terminal equivalent to sudo, but why call it sudo? That’s a very non-Windows name. But whatever.
For the unfamiliar, sudo allows you to run a command as another user, often root. A typical scenario is where a user needs to run one command as root, but the system administrator doesn’t want to give away all the keys to the kingdom. Using sudo they can give the user permission to run one command and only one command.
That’s great for sudo’s original intent: multi-user systems with segregated privileges.
For the hobbyist, it’s often burdensome.
Of course, there’s a class of nerds who are going to insist you should do everything as an unprivileged user and never ever login or do things as root. I saw a passionately argued article some years ago where the author excoriated those who’d download a tarball and compile/install as root. You’re supposed to untar and compile as an unprivileged user and then type ‘sudo make install’. OK, dude, but that really isn’t buying you anything.
As a hobbyist, I disable root logins, but once I’m on the box I ‘su -‘ and do a lot of work as root. Partly that’s because I’ve ben sysadminning systems since the early 90s, partly because I’m careful, and partly because it’s my own stuff and it’s not like I’m going to scram the reactor if I type reboot in the wrong window.
Typically I don’t even install sudo and I think that’s pretty common among hobbyists. LowEndTalk member @darkimmortal commented:
I keep it uninstalled on all my systems and don’t miss it except for the annoyance of editing it out of copy+pasted commands
I wonder if you could replace sudo with a basic alias or shell script which shims the behaviour expected by other scripts by replacing it with other equivalent commands? Or if you were running this commands as root anyway, an even more basic shim that just runs the command as-is.
alias sudo='/usr/bin/true && '
sudo make install
/usr/bin/true && make install
Related Posts:
- Is Your Soul as Dark as a Christmas Stocking’s Coal?Make Your Online World Match - December 20, 2024
- Hosteroid has a HOT, Limited Stock Offer in Vienna or Amsterdam! - December 19, 2024
- Cheap Dedi Alert! LinkSecured Has an e3-1240 for $18.88/Month in LA, Dallas, or Phoenix! - December 18, 2024
What will happen if you use an empty string?
alias sudo=’ ‘
I have similar experience as you and do the same thing on my own home systems except if the commands ask for sufo I just preface all of the commands with the following.
dnf install Sudo -y
Or
apt install sudo —y
Especially if it’s a docker container
As you know when you tar and extractor file as root if that file has malicious code, it could do more harm if it’s run as the root user