After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 129718 - user-admin removes more groups than asked for
user-admin removes more groups than asked for
Status: RESOLVED FIXED
Product: gnome-system-tools
Classification: Deprecated
Component: users-admin
0.30.0
Other Linux
: Normal major
: ---
Assigned To: Carlos Garnacho
Carlos Garnacho
Depends on:
Blocks:
 
 
Reported: 2003-12-20 06:17 UTC by Mario Vazquez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
patch to log the backend activity during the data saving (3.25 KB, patch)
2004-01-20 00:41 UTC, Carlos Garnacho
none Details | Review

Description Mario Vazquez 2003-12-20 06:17:04 UTC
Under Gentoo adding a user work fine, but when removing it using the gui,
most of the groups where removed.

For the following example I worked with a new user called mikene.  Was the
only one desired to be modified on the user files.  I created it with
defaults settings (no additional subgroup selected) at creation, or removal.

1) Add the mikene user using default settings, the changes are below.

File changes after adding the user:

# diff -u /download/etc/passwd passwd
--- /download/etc/passwd        2003-12-16 15:47:41.000000000 -0400
+++ passwd      2003-12-16 16:14:04.000000000 -0400
@@ -43,3 +43,4 @@
 p2p:x:1002:100::/home/p2p:/bin/bash
 sshd:x:22:22:sshd:/var/empty:/dev/null
 cvs:x:1003:408:added by portage for cvs:/home/cvsroot:/bin/false
+mikene:x:1004:100::/home/mikene:/bin/bash

# diff -u /download/etc/group group

This indeed show the user was created right.  

2) Open again the gui, and remove the user mikene, apply settings.

File changes after removing the user:

# diff -u /download/etc/group group
--- /download/etc/group 2003-12-16 15:47:40.000000000 -0400
+++ group       2003-12-16 16:16:10.000000000 -0400
@@ -1,51 +1,14 @@
 root:x:0:root
 bin:x:1:root,bin,daemon
 daemon:x:2:root,bin,daemon
-sys:x:3:root,bin,adm
 adm:x:4:root,adm,daemon
-tty:x:5:mariov
-disk:x:6:root,adm
 lp:x:7:lp
-mem:x:8:
-kmem:x:9:
-wheel:x:10:root,mariov
-floppy:x:11:root,mariov
 mail:x:12:mail
 news:x:13:news
 uucp:x:14:uucp,mariov
 man:x:15:man
 cron:x:16:cron
-console:x:17:
-audio:x:18:mariov
-cdrom:x:19:mariov
-dialout:x:20:root,mariov
 ftp:x:21:
-sshd:x:22:
 at:x:25:at
-tape:x:26:root
-video:x:27:root,mariov
 squid:x:31:squid
-gdm:x:32:gdm
-xfs:x:33:xfs
-games:x:35:
-named:x:40:named
-mysql:x:60:
-postgres:x:70:
-cdrw:x:80:mariov
-apache:x:81:
-nut:x:84:
-usb:x:85:mariov
-vpopmail:x:89:
-users:x:100:games,mariov
-nofiles:x:200:
-qmail:x:201:
-postfix:x:207:
-postdrop:x:208:
-smmsp:x:209:smmsp
-slocate:x:245:
-portage:x:250:portage,mariov
-utmp:x:406:
-proftpd:x:407:
-nogroup:x:65533:
-nobody:x:65534:
-cvs:x:408:
+users:x:100:mariov

# diff -u /download/etc/passwd passwd
--- /download/etc/passwd        2003-12-16 15:47:41.000000000 -0400
+++ passwd      2003-12-16 16:16:11.000000000 -0400
@@ -15,31 +15,5 @@
 cron:x:16:16:cron:/var/spool/cron:/bin/false
 ftp:x:21:21::/home/ftp:/bin/false
 at:x:25:25:at:/var/spool/cron/atjobs:/bin/false
-squid:x:31:31:Squid:/var/cache/squid:/bin/false
-gdm:x:32:32:GDM:/var/lib/gdm:/bin/false
-xfs:x:33:33:X Font Server:/etc/X11/fs:/bin/false
-games:x:35:35:games:/usr/games:/bin/false
-named:x:40:40:bind:/var/bind:/bin/false
-mysql:x:60:60:mysql:/var/lib/mysql:/bin/false
-postgres:x:70:70::/var/lib/postgresql:/bin/bash
-apache:x:81:81:apache:/home/httpd:/bin/false
-nut:x:84:84:nut:/var/state/nut:/bin/false
-cyrus:x:85:12::/usr/cyrus:/bin/false
-vpopmail:x:89:89::/var/vpopmail:/bin/false
-alias:x:200:200::/var/qmail/alias:/bin/false
-qmaild:x:201:200::/var/qmail:/bin/false
-qmaill:x:202:200::/var/qmail:/bin/false
-qmailp:x:203:200::/var/qmail:/bin/false
-qmailq:x:204:201::/var/qmail:/bin/false
-qmailr:x:205:201::/var/qmail:/bin/false
-qmails:x:206:201::/var/qmail:/bin/false
-postfix:x:207:207:postfix:/var/spool/postfix:/bin/false
-smmsp:x:209:209:smmsp:/var/spool/mqueue:/bin/false
-portage:x:250:250:portage:/var/tmp/portage:/bin/false
-guest:x:405:100:guest:/dev/null:/dev/null
+squid:x:31:31:Squid::
 mariov:x:1000:100::/home/mariov:/bin/bash
-nobody:x:65534:65534:nobody:/:/bin/false
-proftpd:x:1001:407::/home/ftp:/bin/false
-p2p:x:1002:100::/home/p2p:/bin/bash
-sshd:x:22:22:sshd:/var/empty:/dev/null
-cvs:x:1003:408:added by portage for cvs:/home/cvsroot:/bin/false


Many of the groups where removed, even many of them that do not have any
relation with the user created.  Also the problem is so severe that even
root info is lost and there is no way to log/su as root after the changes.

Even work directly with the xml file as suggested on bug # 122389, but
changes I do to the file by hand are applied without problems.  .  I will
work more closely with the backend xml and see if found the problem.

My system is Gentoo 1.4 compiled from scratch with that version, and
running unstable packages updated twice a week.
Comment 1 Carlos Garnacho 2004-01-20 00:40:00 UTC
Mario, please, could you try this patch? this will leave a copy of the
XML that's sent back to the backend in /tmp/gst-xml-backup, and a log
of the users/groups that are added/deleted/changed in /tmp/users-log

hope that this helps to clarify the mistery :/
Comment 2 Carlos Garnacho 2004-01-20 00:41:36 UTC
Created attachment 23542 [details] [review]
patch to log the backend activity during the data saving
Comment 3 Carlos Garnacho 2004-01-20 23:44:41 UTC
Could you try also the latest CVS version? I've made little
modifications a few hours ago to the code that sends the XML to the
backend, maybe (only maybe) they could fix the problem...
Comment 4 Carlos Garnacho 2004-01-23 20:34:49 UTC
bug #131493, which is (IMHO) a duplicate of this bug, has been fixed,
could you try latest CVS and close the bug if it already works?
Comment 5 Mario Vazquez 2004-01-26 18:57:11 UTC
Haven't tested your latest CVS patchs, but after screwing my
installation, reinstall Gentoo again and this time with gst 0.31.1 I
have not seen the problem.  It add and removes users without any harm.
 I do not know if was something wrong installed on my system, or the
unstable gnome ebuilds from breakmygentoo.net I was using before (and
not using now).  Anyway, its working well right now, but I will test
your changes just in case.

Comment 6 Carlos Garnacho 2004-01-29 14:53:54 UTC
as I said, the bug #131493, which is indeed a duplicate of this, is
fixed, so I'll close it, please reopen if you see again the strange
behaviour

Thanks