GNOME Bugzilla – Bug 395056
Changing UID needs notice to reboot
Last modified: 2009-08-20 16:08:25 UTC
That bug has been opened on https://launchpad.net/ubuntu/+source/gnome-system-tools/+bug/78527 "Binary package hint: gnome-system-tools This is tested against Feisty. From User settings, go to Properties for the currently logged in user, select the Advanced Tab, and change the User ID to a different number, and click Okay. It becomes impossible to launch other applications (for example, restarting the User settings dialog). Logging out results in a number of error messages from Gconf and other gnome system tools. Perhaps the safest behavior would be to prohibit changing the UID of the currently logged in user. The ideal solution would be to delay the change until the next login, but I don't know if gnome-system-tools is set up to do that."
Created attachment 80161 [details] [review] Patch to address problem Here's a proposed patch to fix the problem. I'm a bit iffy on relying on the USERNAME environment variable, but it seems to work ok on my Ubuntu Feisty system.
Thanks a lot for working on this issue, however, it should also apply to *any* logged in user, not just the one who's running the tools, and should guard against deleting the user, not just modifying it. IMHO a proper fix would be getting UTMP info (kind of like what /usr/bin/who does) to know which users are logged in.
Fixed in 47f51819808cdada015c480f81bc5664a9cae4e5. We now disable the entry when user is logged in, and show a notice. Bryce: using oobs_user_get_active (user) you could get what Carlos wanted - but this function is not listed in the docs for some reason. ;-)