On Sat, May 21, 2022 at 03:19:09PM +0200, tomas@tuxteam.de wrote:
> Less typing, more general. Nobody's trying to dissuade you of doing
> "sudo bash" or "sudo su" or...
I am getting nowhere fast. I think all will be okay if (and only if) I can do these two things:
1. define root's path for a login shell
If I read the bash docs correctly, I can set the path in either /etc/profile or /root/.profile.
2. define root's path for a non-login shell
If I read the bash docs correctly, I can set the path either in /etc/bash.bashrc or /root/.bashrc.
If those assumptions are correct, then, with the proper incantation of a one-shot sudo command, the command should use the expected path for root and use a raku script to install a compiled C executable and its associated products (specifically openssl and apache2) to their proper places on the system, i.e., provide the same result as 'sudo make install'.
At this point I am not concerned with becoming root for multiple commands, just:
$ sudo [perhaps with some sudo args] some-user-space-command with args
So, are my assumptions correct? If do, what are the proper sudo args for each use, if any?
Thanks.
-Tom