1106 shaares
173 results
tagged
linux
#ls -l /proc/*/fd/ | grep -C 2 deleted
Parce que pour du send only, postfix est overkill
SSMTP, c'est juste deux fichiers de conf:
# /etc/ssmtp/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=adresse_mail
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=mail.gandi.net:587
# Where will the mail seem to come from?
#rewriteDomain=y
# The full hostname
hostname=locahost.localdomain
# Use SSL/TLS before starting negotiation
UseTLS=Yes
UseSTARTTLS=Yes
# Username/Password
AuthUser=adresse_mail
AuthPass=password
# Email 'From header's can override the default domain?
FromLineOverride=yes
#/etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:adresse_mail:mail.gandi.net:587
SSMTP, c'est juste deux fichiers de conf:
# /etc/ssmtp/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=adresse_mail
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
mailhub=mail.gandi.net:587
# Where will the mail seem to come from?
#rewriteDomain=y
# The full hostname
hostname=locahost.localdomain
# Use SSL/TLS before starting negotiation
UseTLS=Yes
UseSTARTTLS=Yes
# Username/Password
AuthUser=adresse_mail
AuthPass=password
# Email 'From header's can override the default domain?
FromLineOverride=yes
#/etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:adresse_mail:mail.gandi.net:587
Untar and launch without root access
reptyr permet de rattacher un process a GNU screen.
$ reptyr `pidof process_name`
$ reptyr `pidof process_name`
Ça simplifie énormément mon script qui utilisait transmission daemon.
A tester
A tester
En cours de test sur le serveur
1.45 TB en 1 jours, 9h, 18m et 24.75s :-)
compression lz4
EDIT: Pensez à installer le module llfuse (python-llfuse) pour monter les backup comme des mountpoint fuse.
sudo borg mount /path/to/backup::backup_name /tmp/mountpoint
ou
sudo borg mount /path/to/backup /tmp/mountpoint
<3 Borg Backup
1.45 TB en 1 jours, 9h, 18m et 24.75s :-)
compression lz4
EDIT: Pensez à installer le module llfuse (python-llfuse) pour monter les backup comme des mountpoint fuse.
sudo borg mount /path/to/backup::backup_name /tmp/mountpoint
ou
sudo borg mount /path/to/backup /tmp/mountpoint
<3 Borg Backup
<<Mise à jour Kernel sans reboot
Kexec vous permet de bypasser la phase d’amorçage du système, il charge directement le nouveau Kernel en mémoire et l’exécute.
Pour installer kexec lancez la commande suivante :
sudo apt-get install kexec-tools
Maintenant pour lancer la mise à jour Kernel sans reboot, exécutons la commande suivante
sudo systemctl kexec
Votre session SSH va couper, re-lancez la et vérfiez la version du Kernel via la commande
uname -r
Pour effectuer un reboot « normal » il faudra désormais utiliser la commande
coldreboot
>>
A tester...
Kexec vous permet de bypasser la phase d’amorçage du système, il charge directement le nouveau Kernel en mémoire et l’exécute.
Pour installer kexec lancez la commande suivante :
sudo apt-get install kexec-tools
Maintenant pour lancer la mise à jour Kernel sans reboot, exécutons la commande suivante
sudo systemctl kexec
Votre session SSH va couper, re-lancez la et vérfiez la version du Kernel via la commande
uname -r
Pour effectuer un reboot « normal » il faudra désormais utiliser la commande
coldreboot
>>
A tester...
Un interface GTK pour monitorer ses services systemd.
Parce que je le retrouve pas dans mes liens... et que j'ai encore cherché comme un fou.
echo "0 0 0" >/sys/class/scsi_host/host<n>/scan
echo "0 0 0" >/sys/class/scsi_host/host<n>/scan
The problem is that the .img files are not images of a partition, but of a whole disk. That means they start with a bootloader and a partition table. You have to find out the offset of the partition and mount it with the offset option of mount.
If you do a
Code:
fdisk -l /path/to/image
it will show you the block-size and the start-block of the partition. You can use that to calculate the offset.
For example, I have an image of a bootable stick with a 4GB FAT32 partition. The output of the fdisk command is
Code:
Disk Stick.img: 3984 MB, 3984588800 bytes
249 heads, 6 sectors/track, 5209 cylinders, total 7782400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004bfaa
Device Boot Start End Blocks Id System
Stick.img1 * 128 8015999 4007936 b W95 FAT32
So I have a block-size of 512 bytes and the start-block is 128. The offset is 512 * 128 = 65536.
So the mount command would be
Code:
mount -o loop,offset=65536 Stick.img /mnt/tmp
If you do a
Code:
fdisk -l /path/to/image
it will show you the block-size and the start-block of the partition. You can use that to calculate the offset.
For example, I have an image of a bootable stick with a 4GB FAT32 partition. The output of the fdisk command is
Code:
Disk Stick.img: 3984 MB, 3984588800 bytes
249 heads, 6 sectors/track, 5209 cylinders, total 7782400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004bfaa
Device Boot Start End Blocks Id System
Stick.img1 * 128 8015999 4007936 b W95 FAT32
So I have a block-size of 512 bytes and the start-block is 128. The offset is 512 * 128 = 65536.
So the mount command would be
Code:
mount -o loop,offset=65536 Stick.img /mnt/tmp
Des VM virtualbox / vagrant de MS fournis par MS. Peux servir un jour...
As root obv
for i in {0..5}
do
echo "0 0 0" >/sys/class/scsi_host/host$i/scan
done
for i in {0..5}
do
echo "0 0 0" >/sys/class/scsi_host/host$i/scan
done
Un steetfighter-like opensource sous Linux
Tout simplement...
gpg -ca photo.jpg
gpg -d photo.jpg.asc > photo.jpg
gpg -ca photo.jpg
gpg -d photo.jpg.asc > photo.jpg
Si on cherche les police ttf installé, elles sont dans /usr/share/fonts/TTF
Pas mal, ça a juste mis mon serveur à genou pendant 40 minutes...
Log à étudier.
Log à étudier.
Je l'avais bookmarké en avril mais le lien était mort depuis.
"Fim manage the integrity of a complete file tree.
Fim is compiled using Java 8 and require Java 8 to run. You can download Java 8 from here.
You need at least Java 8 Standard Edition JRE. You can also use the OpenJDK 8." :-(
Fim is compiled using Java 8 and require Java 8 to run. You can download Java 8 from here.
You need at least Java 8 Standard Edition JRE. You can also use the OpenJDK 8." :-(
"The LaZagne project is an open source application used to retrieve lots of passwords stored on a local computer. Each software stores its passwords using different techniques (plaintext, APIs, custom algorithms, databases, etc.). This tool has been developed for the purpose of finding these passwords for the most commonly-used software. At this moment, it supports 22 Programs on Microsoft Windows and 12 on a Linux/Unix-Like OS."