Bug 217902 - "useradd: user fbubble already exists" during update
Summary: "useradd: user fbubble already exists" during update
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: frozen-bubble
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Matthias Saou
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-30 18:00 UTC by Thorsten Leemhuis
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version: 2.1.0-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-04 10:03:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Thorsten Leemhuis 2006-11-30 18:00:00 UTC
Description of problem:
During todays update with yum on FC& I saw this:

>Updating  : frozen-bubble-server         ##################### [ 58/120] 
>useradd: Benutzer fbubble vorhanden

English would probably be something like "s/Benutzer fbubble vorhanden/User
fbubble already exists/

Version-Release number of selected component (if applicable):
frozen-bubble-2.1.0-1.fc6

How reproducible:
Seen only once, but likely a bug in the scripts -- they only should create the
user on install, not on update.

Comment 1 Hans de Goede 2006-11-30 19:43:38 UTC
Re-assigning to matthias, as he is the fb owner now, matthias, could you update 
owners.list to reflect this? Thanks.


Comment 2 Matthias Saou 2006-12-01 11:02:47 UTC
The owners.list file is now updated, sorry about forgetting that.
The frozen-bubble package has also been fixed (note that this output was
harmless), and the new builds should be available tomorrow at the latest.

Comment 3 Thorsten Leemhuis 2006-12-02 11:20:13 UTC
(In reply to comment #2)
> The frozen-bubble package has also been fixed (note that this output was
> harmless),

Well, yes, trying to add the user on each update should be harmless, but I
consider this a bad behaviour, and as such your

-/usr/sbin/useradd -r -s /sbin/nologin -d / fbubble || :
+/usr/sbin/useradd -r -s /sbin/nologin -d / fbubble &>/dev/null || :

not a fix but rather a "not that nice workaround". Why don't you simply check
"if new install add user" and "if update do nothing" in the %post scriptlet?
Just a suggestion.

Comment 4 Matthias Saou 2006-12-04 09:50:34 UTC
Fb 1.0.0 packages didn't include the user, so people could be updating fb from
1.0.0 to 2.x.x, and wouldn't get the user created. The proper fix would be to
check if the user exists before trying to create it, but it wouldn't save any
process forking from the scriplet, and would still mean silencing some program's
failure ("id"'s outpout), so there isn't much gain IMHO.

Comment 5 Thorsten Leemhuis 2006-12-04 10:03:54 UTC
(In reply to comment #4)
> Fb 1.0.0 packages didn't include the user, so people could be updating fb from
> 1.0.0 to 2.x.x, and wouldn't get the user created.

Hmmm, the server package is seperate and new afaik, so that would not be a problem.

> The proper fix would be to
> check if the user exists before trying to create it, but it wouldn't save any
> process forking from the scriplet, and would still mean silencing some program's
> failure ("id"'s outpout), so there isn't much gain IMHO.

I disagree -- but it's not worth arguing to much as far as I'm concerned, so
let's stop here.

Comment 6 Matthias Saou 2006-12-04 10:18:09 UTC
I do understand your concern, though (and you are right about the server package
being new, my bad). If you ever feel like proposing a user account creation
guideline, which would include a solid yet simple check before trying to create
the account, I'm all for it.


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