Supprimer session sous ubuntu

Fermé
samijalwi Messages postés 51 Date d'inscription samedi 13 février 2010 Statut Membre Dernière intervention 20 mai 2010 - 14 mai 2010 à 11:30
 xiloa - 21 mai 2010 à 12:05
Bonjour,
J'ai deux session ou de compte dont ubuntu et je n'arrive pas à supprimer la seconde depuis le terminal ?
merci de m'aider.



A voir également:

3 réponses

ricou34 Messages postés 1234 Date d'inscription mercredi 11 mai 2005 Statut Membre Dernière intervention 25 janvier 2018 259
14 mai 2010 à 11:37
En mode graphique çà marche aussi, dans Administration et Utilisateurs et groupe.

http://doc.ubuntu-fr.org/users-admin?s[]=supprimer&s[]=utilisateur#supprimer_un_compte_d_utilisateur
0
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 3 567
Modifié par lami20j le 14/05/2010 à 11:51
Salut,


/!\ Supprimer une session ne veut pas dire supprimer compte utilisateur.

Il suffit de cherche le pid de la session et le tuer

Un exemple.
toto connecté dans tty1 ensuite en mode graphique avec startx -- :1

Dans ce cas on a les PID (voir en gras)
tty - PID 5304 (pour la session shell)
x-session-manager - PID 5405 (pour la session graphique)

lami20j@debian-acer:~$ w   
 11:44:59 up 1 day,  4:22,  4 users,  load average: 1,01, 0,51, 0,21   
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT   
toto     tty1                      11:42    2:30   3.38s  0.53s -sh   
lami20j  tty7     :0               Thu07   26:22m  4:05m  0.79s x-session-manager   
lami20j  pts/0    :0.0             Thu07   12:28m  4:18m  0.52s bash   
lami20j  pts/1    :0.0             Thu07    0.00s  3:28m  0.01s w   
lami20j@debian-acer:~$ ps aux | grep toto   
toto      5304  0.3  0.1   6940  3356 tty1     S+   11:42   0:00 -sh   
toto      5335  0.0  0.0   2968   812 tty1     S    11:42   0:00 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1 -auth /tmp/serverauth.R0yodJHLAs   
toto      5344  0.0  0.0   3436   940 tty1     S    11:42   0:00 /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session x-session-manager   
toto      5396  0.0  0.0   3240   340 ?        Ss   11:42   0:00 /usr/bin/ssh-agent /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session x-session-manager   
toto      5405  0.0  0.3  27040  6748 tty1     Sl   11:42   0:00 x-session-manager   
toto      5408  0.0  0.0   3296   728 tty1     S    11:42   0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager   
toto      5409  0.0  0.0   2720   996 ?        Ss   11:42   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session   
toto      5412  0.1  0.2   8676  4376 ?        S    11:42   0:00 /usr/lib/libgconf2-4/gconfd-2   
toto      5419  0.1  0.4  68980  8644 tty1     S    11:42   0:00 gnome-power-manager   
toto      5420  0.1  0.5  24648 10524 ?        Ss   11:42   0:00 /usr/lib/gnome-settings-daemon/gnome-settings-daemon   
toto      5421  0.0  0.1  24920  2272 tty1     Sl   11:42   0:00 gnome-keyring-daemon --start --components=secrets   
toto      5425  0.0  0.1   8100  2452 ?        S    11:42   0:00 /usr/lib/gvfs/gvfsd   
toto      5430  0.0  0.3  19304  7456 tty1     S    11:42   0:00 /usr/bin/metacity   
toto      5433  0.0  0.1   8720  3220 ?        S    11:42   0:00 /usr/lib/gvfs/gvfs-gdu-volume-monitor   
toto      5434  0.3  0.8  84176 16676 tty1     S    11:42   0:00 gnome-panel   
toto      5436  0.0  0.1  17672  2256 ?        Sl   11:42   0:00 /usr/lib/gvfs/gvfs-afc-volume-monitor   
toto      5439  0.0  0.1   7800  2168 ?        S    11:42   0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor   
toto      5440  1.2  0.8  90896 18112 tty1     S    11:42   0:01 nautilus   
toto      5442  0.0  0.2  18092  5860 tty1     S    11:42   0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1   
toto      5443  0.0  0.2  17852  6180 tty1     S    11:42   0:00 kerneloops-applet   
toto      5444  0.0  0.1  18760  2444 ?        Ss   11:42   0:00 gnome-screensaver   
toto      5446  0.0  0.1  43056  3636 ?        Ssl  11:42   0:00 /usr/lib/bonobo-activation/bonobo-activation-server --ac-activate --ior-output-fd=18   
toto      5448  0.0  0.1   8320  2908 ?        S    11:42   0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.10 /org/gtk/gvfs/exec_spaw/0   
toto      5460  0.0  0.1   7980  2508 ?        S    11:42   0:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.10 /org/gtk/gvfs/exec_spaw/1   
lami20j   5502  0.0  0.0   4124   832 pts/1    S+   11:45   0:00 grep toto   
lami20j@debian-acer:~$ sudo kill -9 5405 
lami20j@debian-acer:~$ w   
 11:45:31 up 1 day,  4:23,  4 users,  load average: 1,46, 0,66, 0,27   
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT   
toto     tty1                      11:42   12.00s  0.70s  0.00s xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1w -auth /tmp/serverauth.rSXkgimhAR   
lami20j  tty7     :0               Thu07   26:23m  4:05m  0.79s x-session-manager   
lami20j  pts/0    :0.0             Thu07   12:29m  4:18m  0.52s bash   
lami20j  pts/1    :0.0             Thu07    0.00s  3:28m  0.00s w   
lami20j@debian-acer:~$ ps aux | grep toto   
toto      5304  0.2  0.1   6940  3360 tty1     S    11:42   0:00 -sh   
toto      5514  0.1  0.0   4980  1300 tty1     S+   11:45   0:00 /bin/bash /usr/bin/startx -- :1w   
toto      5532  0.0  0.0   2968   640 tty1     S+   11:45   0:00 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1w -auth /tmp/serverauth.rSXkgimhAR   
lami20j   5545  0.0  0.0   4120   824 pts/1    S+   11:45   0:00 grep toto   
lami20j@debian-acer:~$ sudo kill -9 5304 
lami20j@debian-acer:~$ ps aux | grep toto   
toto      5514  0.0  0.0   4980  1300 ?        S    11:45   0:00 /bin/bash /usr/bin/startx -- :1w   
toto      5532  0.0  0.0   2968   640 ?        S    11:45   0:00 xinit /etc/X11/xinit/xinitrc -- /usr/bin/X :1w -auth /tmp/serverauth.rSXkgimhAR   
lami20j   5556  0.0  0.0   4120   824 pts/1    S+   11:45   0:00 grep toto   
lami20j@debian-acer:~$ w   
 11:46:14 up 1 day,  4:23,  3 users,  load average: 0,82, 0,59, 0,27   
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT   
lami20j  tty7     :0               Thu07   26:23m  4:05m  0.79s x-session-manager   
lami20j  pts/0    :0.0             Thu07   12:29m  4:18m  0.52s bash   
lami20j  pts/1    :0.0             Thu07    0.00s  3:28m  0.00s w   
lami20j@debian-acer:~$ ps aux | grep toto 
lami20j   5611  0.0  0.0   4120   820 pts/1    S+   11:50   0:00 grep toto 
 
0
samijalwi Messages postés 51 Date d'inscription samedi 13 février 2010 Statut Membre Dernière intervention 20 mai 2010
20 mai 2010 à 22:12
merci pour la solution.
0
salut

il faut te connecter avec user_à_garder
ouvrir une console
sudo rmuser -rmdir user_a_detruire
0