Red Hat Bugzilla – Bug 217902
"useradd: user fbubble already exists" during update
Last modified: 2007-11-30 17:11:50 EST
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):
Seen only once, but likely a bug in the scripts -- they only should create the
user on install, not on update.
Re-assigning to matthias, as he is the fb owner now, matthias, could you update
owners.list to reflect this? Thanks.
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.
(In reply to comment #2)
> The frozen-bubble package has also been fixed (note that this output was
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.
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.
(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.
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.