RSS

Posts in 2018

  • Bash tcp client

    Wednesday, March 21, 2018 in Miscellaneous

    There are somea fun toys in bash. I would not rely on it for a production script, but here is one such things : exec 5<>/dev/tcp/10.1.0.254/8080 bash$ echo -e "GET / HTTP/1.0\n" >&5 bash$ cat <&5

    Read more

  • Seti@Home

    Monday, March 05, 2018 in Miscellaneous

    apt install boinc echo "graou" > /var/lib/boinc-client/gui_rpc_auth.cfg systemctl restart boinc-client boinccmd --host localhost --passwd graou --get_messages 0 boinccmd --host localhost --passwd graou --get_state|less boinccmd --host …

    Read more

  • Rewrite a git commit history

    Monday, March 05, 2018 in Commands

    Here is how to rewrite a git commit history, for example to remove a file : git filter-branch –index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all

    Read more

  • Removing libreoffice write protection

    Monday, March 05, 2018 in Miscellaneous

    You can choose to ignore write-protection by setting Tools > Options > libreOffice Writer > Formatting Aids > Protected Areas > Ignore protection.

    Read more

  • Qmail

    Monday, March 05, 2018 in Miscellaneous

    Commands Get statistics : qmail-qstat list queued mails : qmail-qread Read an email in the queue (NNNN is the #id from qmail-qread) : find /var/qmail/queue -name NNNN| xargs cat | less Change queue lifetime for qmail in seconds (example here for 15 …

    Read more

  • omreport

    Monday, March 05, 2018 in Commands

    Your raid status at a glance omreport storage pdisk controller=0 vdisk=0|grep -E '^ID|State|Capacity|Part Number'|grep -B1 -A2 Failed Other commands omreport storage vdisk omreport storage pdisk controller=0 vdisk=0 omreport storage pdisk …

    Read more

  • MegaCLI

    Monday, March 05, 2018 in Commands

    megacli -LDInfo -LALL -aALL|grep state MegaCli -PDlist -a0|less

    Read more

  • Link to a deleted inode

    Monday, March 05, 2018 in Miscellaneous

    Get the inode number from lsof, then run debugfs -w /dev/mapper/vg-home -R 'link <16008> /some/path' where 16008 is the inode number (the < > are important, they tell debugfs you manipulate an inode). The path is relative to the root of …

    Read more

  • LDAP auth with nginx

    Monday, March 05, 2018 in Miscellaneous

    ldap_server ldap { auth_ldap_cache_enabled on; auth_ldap_cache_expiration_time 10000; auth_ldap_cache_size 1000; url "ldaps://ldapslave.adyxax.org/ou=Users,dc=adyxax,dc=org?uid?sub?(objectClass=posixAccount)"; binddn …

    Read more

  • ipmitool

    Monday, March 05, 2018 in Commands

    launch ipmi shell : ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U <ipmi_user> shell launch ipmi remote text console : ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U <ipmi_user> sol activate Show local ipmi lan configuration : ipmitool lan print …

    Read more