111 reputation
4
bio website
location
age
visits member for 1 year, 11 months
seen Feb 20 at 23:24

Feb
19
comment 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all?
Chaos - "shopt -q login_shell && echo 'Login shell' || echo 'No login shell'" These kinds of suggestions I see often, but why make it so long? The && operator means if exit code 0 then "do next command" and the double pipes (||) means else (if not 0) then do this command. So what it is basically saying if exit code 0 then echo "Login Shell", if exit code 1 (fail) then echo "No login". Why not just "shopt -q login_shell ; echo $?" $? means the result/exit code of the preceding command. In most if not all programs 0 means success, 1 or more means fail. So if the echo is 0 = success...
Feb
19
comment 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all?
Also, it is more "correct" to say that su stands for switch user, rather than super user. I.e. run a php script: su www-data /usr/share/script.php or just su www-data for interactive shell. But su without any user name will asume the root (super user) account.
Oct
8
awarded  Student
Sep
18
awarded  Tumbleweed
Sep
11
awarded  Teacher
Sep
11
revised How do I configure rsyslog to send logs from a specific program to a remote syslog server?
Just added some more general info...
Sep
11
awarded  Editor
Sep
11
revised How do I configure rsyslog to send logs from a specific program to a remote syslog server?
Just added some more general info...
Sep
11
answered How do I configure rsyslog to send logs from a specific program to a remote syslog server?
Sep
11
asked rsyslog inconsistent logging of hostnames vs IP's