Outils pour utilisateurs

Outils du site


blog

Verrouiller sa session sous GNU/Linux

Voir aussi :

  • loginctl lock-session
  • xdg-screensaver lock

protector de pantalla (xlock) Un protector de pantalla mas ligero que el xscreensaver es xlock

Instalación $ apt-get install xlockmore xautolock $ apt-get install vlock away

xautolock es el protector. xautolock es un demonio para bloquear automáticamente la pantalla $ xautolock -time 5 & Levanta en background bloquear la pantalla si en cinco minutos no hay actividad.

Source : http://petrohs-log.blogspot.fr/2008_12_01_archive.html


vlock

Le nouveau paquet de Jessie (vlock_2.2.2-5) s'est vu retiré le fichier /usr/lib/vlock/modules/new.so suite à un bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702705

Pour ma part, je ne suis pas confronté à ce bug. Je récupère donc le fichier /usr/lib/vlock/modules/new.so du paquet vlock_2.2.2-3_amd64.deb (Debian Wheezy)

$ vlock -n
vlock: loading plugin 'new' failed: No such file or directory

Voir :

http://bts.grml.org/grml/issue1342

http://comments.gmane.org/gmane.linux.distributions.grml.devel/154

vlock -san

wget http://ftp.fr.debian.org/debian/pool/main/v/vlock/vlock_2.2.2-3_amd64.deb
ar x vlock_2.2.2-3_amd64.deb 
tar xf data.tar.gz 
cp ./usr/lib/vlock/modules/new.so /usr/lib/vlock/modules/
chown root:root /usr/lib/vlock/modules/new.so 

Verrouillage transparent de l'écran

xlock -mode blank -geometry 1x1
Un remplacent pour vlock : physlock

Verrouillage graphique

Liste :

lxqt-leave --lockscreen
xscreensaver-command -lock
2025/03/24 15:06

Vérifier l'intégrité des fichiers avec Fim

Installation

Pour Java 8 sous Jessie, les backports sont nécessaire

echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
 
apt-get update
Install
apt-get install -t jessie-backports openjdk-8-jre-headless
A partir des sources

Nous allons compiler le code Java.

apt-get install maven
apt-get install -t jessie-backports openjdk-8-jdk
cd /opt
git clone https://github.com/evrignaud/fim.git
cd fim
 
mvn clean install
 
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:$PATH
 
alias fim='PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:$PATH /opt/fim/fim' 
2025/03/24 15:06

Vérifier l'intégrité des fichiers

Voir :

find -type f -exec sha512sum {} \; > SHA512SUMS 2>SHA512SUMS.err
sha512sum --quiet -c SHA512SUMS

Sur Debian, vérifier l'intégrité des fichiers de paquets .deb

dpkg --verify
debsums -as

Pour RedHat/CentOS

rpm -Va
2025/03/24 15:06

Serveur NFS v3 et montage client

Préférez la version 4. Voir NFSv4

Voir :

  • rclone serv

Sur le serveur

/etc/exports

/data/plop                  machine1(async,rw,no_root_squash)
exportfs -rv

Si besion

chmod 1777 /data/plop

Sur le client

/etc/fstab

serveurnfs:/data/plop         /import/plop          nfs     defaults,_netdev,nfsvers=3      0 0

rw,bg,hard,rsize=32768,wsize=32768,tcp,vers=3,timeo=600

mkdir -p /import/plop
mount /import/plop

Mount options

nocto: Suppress the retrieval of new attributes when creating a file.
noac: Disable all forms of attribute caching entirely. This extracts a significant performance penalty but it allows two different NFS clients to get reasonable results when both clients are actively writing to a common export on the server.
noacl: Disables Access Control List (ACL) processing.

vers=4.1: NFS v4.1 should be used instead of v4.0 because there is a Linux NFS client bug in v4.0 that can cause significant problems due to stale data.

nofail: Don't halt boot process waiting for this mount to become available

lookupcache=positive: Tells the NFS client to honor positive cache results but invalidates any negative cache results. Negative cache results cause problems with Git. Specifically, a git push can fail to register uniformly across all NFS clients. The negative cache causes the clients to 'remember' that the files did not exist previously.

Test

Supervision

Voir aussi :

Le plus simple pour monitorer NFS étant de créer un fichier de le l'effacer https://docs.netapp.com/us-en/ontap/nfs-config/test-access-client-systems-task.html

stat -f (system call statfs(2)
If the NFS mount is “stale”, then stat -f returns immediately but with a size of -1. The check detects that and results in a warning state.

mount -l | grep nfs
grep nfs /proc/mounts
nfsstat
nfsstat --mounts
mountpoint -q /mnt/foo
findmnt -rno SOURCE,TARGET "$1"
lsof -b
ss -a | grep :nfs
mountpoint="/mnt/testnfs"
#read -t1 < <(stat -t "$mountpoint" 2>&-)
read -r -t1 < <(stat -t "$mountpoint" 2>&-)
if [ -z "$REPLY" ] ; then
  echo "NFS mount stale. Removing..."
fi
2025/03/24 15:06

Remplacer uuencode/uudecode par openssl

Voir aussi :

  • base58

Exemple

$ echo -n "Test" | openssl base64
VGVzdA==
$ echo "VGVzdA==" | openssl base64 -d
Test

En encore

cat /usr/share/doc/systemd/LICENSE.LGPL2.1 | head -12 | gzip | openssl base64
H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+
fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i
nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU
4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw
JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b
vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh
+hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9
VOob+cnrRwACAAA=
(
cat <<EOF
H4sIAAsBF1cAA2VRwW7CMAy95yvecZO6ijLtwBFQQUgdQnTsMu2Qti6NVhKUuCD+
fg6MHTYrOdh+7/nJBv7Gcr1DkZdlvsUyX+fbaYHNblas5pCfr8tc/aPc4p18MM5i
nGYJFlT5QfsLsslkohTm7njxZt8xHuaPsSiY2MLCE6F0LZ+1JyzcYBvNIpNgZetU
4SUTiLZfvbEoWcAs4qblDoveOZ9g5gJH+OsUGI2zbPSUPY8yYFdOFfIT+YuzBBNw
JH8wzNSAHWrxA20bNCawN9XABMFWMvsQm4aCgmvBnTB7U5MNhMbVw4GsOBA86k7b
vbF7GI7y1jF037szNalSH2+RKI87Qmt8YHjqSQcZf/pZ1FWeUFAI5LHcFCmwiiIh
+hssiwV9UwhDXQvM+TvpeiVT+bjizVCJQ0mvLpNf/XGCjmxN6sq4V+1wqGScXCn9
VOob+cnrRwACAAA=
EOF
) | openssl base64 -d | gzip -d > plop.txt

Base64 sans line return :
Utilisez '-A' Exemple

cat plop.sh | openssl base64 | tr -d '\n' | openssl base64 -A -d

Alternatives

2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki