Skip to content

Instantly share code, notes, and snippets.

@seqizz
Last active December 3, 2024 19:11
Show Gist options
  • Select an option

  • Save seqizz/a47fd30f33b154e829876dfddca3ca0a to your computer and use it in GitHub Desktop.

Select an option

Save seqizz/a47fd30f33b154e829876dfddca3ca0a to your computer and use it in GitHub Desktop.

Revisions

  1. seqizz revised this gist Apr 19, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion funanswers.md
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,4 @@ Epoch-calypse a.k.a. "year 2038 problem". But I can't believe you missed the cha

    **How to reboot server when reboot command is not responding?**

    Well, I'd just run it with *-f*. If still not working, you need to use REISUB trick with *Sys Magick* keys, just to see "This combination is not allowed on dmesg. Just press the physical button...
    Well, I'd just run it with *-f*. If still not working, you need to use REISUB trick with *Magic SysRq* key, just to see "This combination is not allowed on dmesg. Just press the physical button...
  2. seqizz revised this gist Apr 19, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions funanswers.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,7 @@
    This is just my answer template for "Fun questions" section on sysadmin interview repo: https://github.com/chassing/linux-sysadmin-interview-questions#fun

    **A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?**

    First of all, I'd get the root privileges from that person away.
    As answer, I have 2 solutions:
    1. I'd create a dumb FS (like fat) on a loopback device and copy this file to there, since every file will have executable rights there.
  3. seqizz revised this gist Apr 19, 2018. 1 changed file with 23 additions and 4 deletions.
    27 changes: 23 additions & 4 deletions funanswers.md
    Original file line number Diff line number Diff line change
    @@ -12,15 +12,34 @@ As answer, I have 2 solutions:
    3. Boot the system on rescue mode and reset the password.

    **I've rebooted a remote server but after 10 minutes I'm still not able to ssh into it, what can be wrong?**

    You screwed up the ssh config, didn't you?
    Try pinging it to see if host is up. If host is not up, that means either you screwed the network or boot settings, congrats.
    Get a remote console over KVM or whichever way you can, and fix what you broke.

    **If you were stuck on a desert island with only 5 command-line utilities, which would you choose?**

    Well *ssh* obviously, so I can connect somewhere to get help. Meanwhile I'd love to have *mail* (to communicate), *find* (to poke around), *vim* (to really poke around) and *sed* (for personal reasons).

    **You come across a random computer and it appears to be a command console for the universe. What is the first thing you type?**
    - Tell me about a creative way that you've used SSH?
    - You have deleted by error a running script, what could you do to restore it?
    - What will happen on 19 January 2038?
    - How to reboot server when reboot command is not responding?

    Not sure actually, I am between two commands so here it is: *date && whoami*

    **Tell me about a creative way that you've used SSH?**

    Well, if you mean *ssh* command itself, I can say reversing a tunnel which uses another tunnel to reach to the holy Internet from a corporation network.

    **You have deleted by error a running script, what could you do to restore it?**

    You dumb.
    1. Get the pid via *ps*
    2. Go under */proc/${pid}/*
    3. You'll see it named as *exe*

    **What will happen on 19 January 2038?**

    Epoch-calypse a.k.a. "year 2038 problem". But I can't believe you missed the chance to ask "What will happen on *20 January 2038*?"

    **How to reboot server when reboot command is not responding?**

    Well, I'd just run it with *-f*. If still not working, you need to use REISUB trick with *Sys Magick* keys, just to see "This combination is not allowed on dmesg. Just press the physical button...
  4. seqizz revised this gist Apr 19, 2018. 1 changed file with 11 additions and 5 deletions.
    16 changes: 11 additions & 5 deletions funanswers.md
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,25 @@
    This is just my answer template for "Fun questions" section on sysadmin interview repo: https://github.com/chassing/linux-sysadmin-interview-questions#fun

    - A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?
    **A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?**
    First of all, I'd get the root privileges from that person away.
    As answer, I have 2 solutions:
    1. I'd create a dumb FS (like fat) on a loopback device and copy this file to there, since every file will have executable rights there.
    2. There is no problem, system is running without problems, so no need to fix.

    - I've lost my root password, what can I do?
    **I've lost my root password, what can I do?**
    1. Slap yourself while looking to mirror.
    2. Start using password manager which you can backup.
    3. Boot the system on rescue mode and reset the password.

    - I've rebooted a remote server but after 10 minutes I'm still not able to ssh into it, what can be wrong?
    - If you were stuck on a desert island with only 5 command-line utilities, which would you choose?
    - You come across a random computer and it appears to be a command console for the universe. What is the first thing you type?
    **I've rebooted a remote server but after 10 minutes I'm still not able to ssh into it, what can be wrong?**
    You screwed up the ssh config, didn't you?
    Try pinging it to see if host is up. If host is not up, that means either you screwed the network or boot settings, congrats.
    Get a remote console over KVM or whichever way you can, and fix what you broke.

    **If you were stuck on a desert island with only 5 command-line utilities, which would you choose?**
    Well *ssh* obviously, so I can connect somewhere to get help. Meanwhile I'd love to have *mail* (to communicate), *find* (to poke around), *vim* (to really poke around) and *sed* (for personal reasons).

    **You come across a random computer and it appears to be a command console for the universe. What is the first thing you type?**
    - Tell me about a creative way that you've used SSH?
    - You have deleted by error a running script, what could you do to restore it?
    - What will happen on 19 January 2038?
  5. seqizz created this gist Apr 19, 2018.
    20 changes: 20 additions & 0 deletions funanswers.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    This is just my answer template for "Fun questions" section on sysadmin interview repo: https://github.com/chassing/linux-sysadmin-interview-questions#fun

    - A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?
    First of all, I'd get the root privileges from that person away.
    As answer, I have 2 solutions:
    1. I'd create a dumb FS (like fat) on a loopback device and copy this file to there, since every file will have executable rights there.
    2. There is no problem, system is running without problems, so no need to fix.

    - I've lost my root password, what can I do?
    1. Slap yourself while looking to mirror.
    2. Start using password manager which you can backup.
    3. Boot the system on rescue mode and reset the password.

    - I've rebooted a remote server but after 10 minutes I'm still not able to ssh into it, what can be wrong?
    - If you were stuck on a desert island with only 5 command-line utilities, which would you choose?
    - You come across a random computer and it appears to be a command console for the universe. What is the first thing you type?
    - Tell me about a creative way that you've used SSH?
    - You have deleted by error a running script, what could you do to restore it?
    - What will happen on 19 January 2038?
    - How to reboot server when reboot command is not responding?