Débloquer gnome-keyring avec SLiM

Un pense-bête plus qu’un véritable article.

Quand on utilise SLiM en lieu et place de gdm (ou tout autre gestionnaire de connexion), mais que malgré tout, on continue d’utiliser le network manager de gnome, il peut être assez pénible de devoir débloquer à la main gnome-keyring à chaque ouverture de session.
Il est possible de remédier à cela en utilisant PAM.
Il faut que les paquets gnome-keyring et libpam-gnome-keyring soient installés (et slim aussi, ça va de soi).
Il suffit ensuite de créer le fichier suivant : /etc/pam.d/slim, s’il n’existe pas, et de le remplir de la manière suivante :


#
# The PAM configuration file for the SLiM graphical login manager
#

# Disallows other than root logins when /etc/nologin exists
# (Replaces the `NOLOGINS_FILE' option from login.defs)
auth       requisite  pam_nologin.so

# This module parses environment configuration file(s)
# and also allows you to use an extended config
# file /etc/security/pam_env.conf.
# 
# parsing /etc/environment needs "readenv=1"
session       required   pam_env.so readenv=1
# locale variables are also kept into /etc/default/locale in etch
# reading this file *in addition to /etc/environment* does not hurt
session       required   pam_env.so readenv=1 envfile=/etc/default/locale

# Standard Un*x authentication.
@include common-auth

# This allows certain extra groups to be granted to a user
# based on things like time of day, tty, service, and user.
# Please edit /etc/security/group.conf to fit your needs
# (Replaces the `CONSOLE_GROUPS' option in login.defs)
auth       optional   pam_group.so

# Uncomment and edit /etc/security/time.conf if you need to set
# time restrainst on logins.
# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
# as well as /etc/porttime)
# account    requisite  pam_time.so

# Uncomment and edit /etc/security/access.conf if you need to
# set access limits.
# (Replaces /etc/login.access file)
# account  required       pam_access.so

# Sets up user limits according to /etc/security/limits.conf
# (Replaces the use of /etc/limits in old login)
session    required   pam_limits.so

# SELinux needs to intervene at login time to ensure that the process
# starts in the proper default security context.
# Uncomment the following line to enable SELinux
# session required pam_selinux.so multiple

# Standard Un*x account and session
@include common-account
@include common-session
@include common-password

auth	optional	pam_gnome_keyring.so
session	optional	pam_gnome_keyring.so  auto_start

Les deux dernières lignes débloquent gnome-keyring.
Plus qu’à se déconnecter et se reconnecter, et ça devrait fonctionner.

Vus : 1763
Publié par mael : 17