Outils pour utilisateurs

Outils du site


blog

GNU/Linux cache DNS

Voir :

  • systemd-resolve
  • dnsmasq
  • nscd
  • bind
  • pdnsd

Voir aussi :

  • ZeroConf / avahi
  • mDNSResponder

nscd

Source : http://www.eyrie.org/~eagle/notes/solaris/dns-cache.html

Vider le cache DNS

nscd -i hosts

Désactiver le cache DNS

/etc/nscd.conf

enable-cache hosts no

Autre conf (Using NSCD with SSSD)

enable-cache hosts yes
enable-cache passwd no
enable-cache group no
enable-cache netgroup no
enable-cache services no

SystemD

sudo resolvectl flush-caches
 
sudo systemd-resolve --flush-caches

Bind

Afficher le cache

rndc dumpdb -cache

Vider le cache

rndc flush

Autres

/etc/init.d/dns-clean restart
 
sudo pdnsd-ctl empty-cache
 
sudo service nscd restart
 
sudo service dnsmasq restart
 
sudo service named restart
 
sudo service avahi-daemon restart
 
sudo killall -HUP mDNSResponder
2025/03/24 15:06

GNU/Linux - Désactivation d'un compte utilisateur

# Verrouillage d'un compte
usermod -L compte
 
# Désactivation de son shell de login
usermod -s /bin/false compte

Désactiver l'expiration du mot de passe pour l'utilisateur toto

chage -M -1 toto
chage -m 0 -M -1 -E -1 toto

Pour voir les infos de l'expiration d'un compte et de l'expiration du mot de pass

chage --list jean

Pour réinitialisé l'historique des mots de passe / pour pouvoir redéfinir un mot de passe déjà utilisé précédameent ;

> /etc/security/opasswd
2025/03/24 15:06

Gnome gnome-keyring

Interface GUI

sudo apt-get install seahorse
seahorse

Reset

rm  ~/.local/share/keyrings/login.keyring

gnome-keyring-daemon sans X pour svn subversion

Source : https://superuser.com/questions/141036/use-of-gnome-keyring-daemon-without-x

Voir aussi :

~/.subversion/config

[auth]
password-stores = gnome-keyring

~/.subversion/servers

[global]
store-passwords = yes
store-plaintext-passwords = no

~/.bash_profile

if [ -e /usr/bin/gnome-keyring-daemon ]; then
  if [ ! -z "`kill -0 $GNOME_KEYRING_PID 2>&1`" ]; then
    # Create dbus transport link for SVN to talk to the keyring.
    eval `dbus-launch --sh-syntax`
 
    # Start the keyring daemon.
    # The use of export here captures the GNOME_KEYRING_PID, GNOME_KEYRING_SOCK
    # env values echoed out at startup.
    export `/usr/bin/gnome-keyring-daemon`
  fi  
fi

~/.bash_logout

# Kill the message bus established for SVN / Keyring communication
if [ ! -z "`kill -0 $DBUS_SESSION_BUS_PID 2>&1`" ]; then
  kill $DBUS_SESSION_BUS_PID > /dev/null 2>&1
fi
 
# Kill the Gnome Keyring Daemon prior to logout.
if [ ! -z "`kill -0 $GNOME_KEYRING_PID 2>&1`" ]; then
  kill $GNOME_KEYRING_PID > /dev/null 2>&1
fi
Pb keyring_tool

Je n'ai jamais réussi à faire fonctionner cet outil

sudo apt-get install gnome-keyring dbus-x11
sudo apt-get install libgnome-keyring-dev build-essential pkg-config autoconf automake
 
./autogen.sh
./configure --prefix=/opt/keyring_tool
sudo make install
 
/opt/keyring_tool/bin/keyring_tool --create=svn

Désactiver gnome-keyring

Permanently disable Gnome Keyring SSH Agent

Source https://www.scivision.co/disable-gnome-keyring-ssh-agent/

/etc/xdg/autostart/gnome-keyring-ssh.desktop

X-GNOME-Autostart-enabled=false

Ou

/etc/xdg/autostart/gnome-keyring-ssh.desktop

NoDisplay=false

Puis décocher l'appli du démarrage automatique

Autre solution

Source : https://faq.i3wm.org/question/4857/how-to-use-chromium-with-password-storegnome-gnome-keyring-daemon.1.html

#chmod -x $(type -p gnome-keyring-daemon)
chmod -x /usr/bin/gnome-keyring /usr/bin/gnome-keyring-daemon
Pour Chromium

/etc/chromium.d/pn-passwordstore

CHROMIUM_FLAGS="$CHROMIUM_FLAGS --password-store=basic"

Erreur No such secret collection at path

No such secret collection at path: /

Solution : reboot

Autres

Droits 700

chmod -R 700 ~/.local/share/keyrings

Flushing passphrases

gnome-keyring-daemon -r -d
2025/03/24 15:06

Git - Install sur windows

Télécharger Git (msysgit)

http://msysgit.github.io

Diffing avec Kdiff3

git config --global diff.tool kdiff3
git config --global merge.tool kdiff3
git config --global difftool.prompt false
git config --global mergetool.prompt false
git config --global mergetool.kdiff3.keepbackup false
git config --global mergetool.kdiff3.trustexitcode false
git config --global mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
2025/03/24 15:06

Git over HTTPS - conf client

Voir aussi :

git clone https://user@git.acme.fr/user/projet

Méthode credential.helper

git config --global credential.helper 'cache --timeout 32400'

Pour désactiver credential.helper temporairement

git -c credential.helper='' push

Effacer toutes les autorisations du cache (forgetting all cached credentials)

git credential-cache exit

Méthode netrc (déconseillé)

Méthode à éviter, car le mot de passe est enregistré en clair

~/.netrc
machine  git.acme.fr
login    user
password P@ssw0rd
chmod 600 ~/.netrc

Voir man netrc Voir aussi http.extraHeader

ou alors

git config --global credential.helper store

http.extraHeader

Exemples

git -c http.extraHeader="Authorization: Basic YmQ2MTY0Om82ZzV4YWU1Zm1xZXFkYmphdGRmamljaGRrNTVsd2VxNGp4eXQyanZ3dGp1enhkd3dneGE=" clone https://azuredevops.example.net/Main/MyProj/_git/MyRepo
 
git config --global http.https://yourdomain/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${{ secrets.BOT_TOKEN }}" | base64)"
 
git --config-env=http.extraheader=GIT_AUTH_HEADER clone https://dev.azure.com/yourOrgName/yourProjectName/_git/yourRepoName 
 
git config -l --local
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