Bug 135280 - hang & corruption when renaming a user
hang & corruption when renaming a user
Product: Fedora
Classification: Fedora
Component: system-config-users (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Nils Philippsen
Depends On:
  Show dependency treegraph
Reported: 2004-10-11 14:22 EDT by Andrew D. Stadler
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-23 11:51:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andrew D. Stadler 2004-10-11 14:22:15 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)

Description of problem:
I created a user account and learned later the user wished for a
different spelling.  I launched system-config-users and selected the
user in question and "properties".

Under the "User Data" tab I retyped the users name and I also changed
the home directory name.  I clicked "OK".  The hourglass is still
turning, 5 minutes later.

Poking around the terminal (which s-c-u contines to spin), I've
determined that:

- in /etc/passwd and /etc/shadow, login and home have been renamed
- in /etc/passwd- and /etc/shadow-, no changes
- /etc/group and /etc/gshadow have not been updated
- the home directory has not been renamed.

Essentially, the account is now "broken" and I'm going to have to use
superuser text editing skills to repair it.  So I'm filing this as
"high priority / data loss" because the GUI tool has easily broken a
user's account.

Version-Release number of selected component (if applicable):

How reproducible:
Didn't try

Steps to Reproduce:
1.  open system config users
2.  select a user and "properties"
3.  try to rename the user and their home dir

Actual Results:  (1) s-c-u hangs (hourglass tumbling)
(2) incomplete changes render the account "broken"

Expected Results:  it should be possible to correctly rename an
account, -or- it should be completely disallowed.  As is, it appears
to have corrupted this account.

Additional info:
Comment 1 Nils Philippsen 2004-10-11 15:47:45 EDT
Andy, I tried this with the same results. Because I was running it
from the command line, I got a python traceback which indicates that
this is some kind of a libuser problem:

Traceback (most recent call last):
  File "/usr/share/system-config-users/userProperties.py", line 512,
in on_ok_button_clicked
RuntimeError: unknown error

Andy, please tell us which version of libuser you have.

Miloslav, should s-c-users (and in turn libuser) allow changing
username and/or home directory or should we block it?
Comment 2 Andrew D. Stadler 2004-10-11 15:53:20 EDT
I'm running a pretty much up2date version of FC, the specific libuser is

Comment 3 Miloslav Trmač 2004-10-11 17:01:22 EDT
The RuntimeError is a duplicate of #78376 and #121252, and
fixed in libuser >= 0.51.10.

The more general problems:
* ADMIN.modifyUser doesn't move the home directory by default,
  contrary to documentation.
* the home directory move functionality actually can't work right now;
  it doesn't remember the old home directory.
* libuser is working on a per-entity basis, so renaming of group
  entries (including the private group) has to be done by s-c-users.

* I'll fix home directory moving and fix modifyUser documentation
  (rather than change modifyUser default)
* Once that is done, s-c-users can call ADMIN.modifyUser(..., True),
  and Require: a fixed version of libuser.
* s-c-users should rename the user in all user's supplementary groups
  and rename user's private group, if any.
Sounds good, Nils?
Comment 4 Nils Philippsen 2004-10-12 02:46:49 EDT
Sounds very good, especially because that means getting a fix for this
other python interface problem we had lately for FC2, i.e. I can get
the fix in that if possible uid == gid for new users.

I guess for s-c-users this means:

- When renaming the home, just trust on libuser to do the right thing
- When renaming a user, take care of the group entities so they don't
have the old user name
- When renaming a group, everything should be OK because users are
either already listed with the group (when it's secondary) or the
group is referenced by GID which doesn't change.

Comment 5 Miloslav Trmač 2004-10-12 03:27:19 EDT

Fixed libuser is libuser-0.52.5-1.

(BTW: libuser renames home directories by copying them and then
removing the original; fixing this can probably wait post-FC3.)
Comment 6 Nils Philippsen 2004-10-12 04:57:03 EDT
Miloslav, can you then pipe a "libuser-0.52.5-0.fc2.1" or so through
the build system for FC2? Thanks.
Comment 7 Miloslav Trmač 2004-10-13 03:49:28 EDT
libuser-0.52.5-0.FC2.1 is published now.
Comment 8 Nils Philippsen 2004-10-13 11:54:10 EDT
system-config-services-1.2.25-0.fc2.1 containes the needed changes for
renaming users.

Note You need to log in before you can comment on or make changes to this bug.