Bug 462054 - Useradd errors reported when installing packages
Summary: Useradd errors reported when installing packages
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peter Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-12 08:41 UTC by Simon Andrews
Modified: 2012-09-06 20:29 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-09-16 08:38:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Simon Andrews 2008-09-12 08:41:38 UTC
Description of problem:
After installing the latest shadow-utils I'm seeing errors like this in /var/log/secure

Sep 11 14:58:05 bilin1 useradd[9216]: failed adding user `sshd', data deleted
Sep 12 05:19:39 bilin1 useradd[13233]: failed adding user `backuppc', data deleted

I can find no trace of similar messages coming up before.  In the case of the backuppc error, no such user exists on the system so it looks like the command has completely failed.

Version-Release number of selected component (if applicable):
shadow-utils-4.1.1-4.fc9.x86_64

How reproducible:
Happened consistently across 6 different servers.

Steps to Reproduce:
1.Install latest shadow utils
2.Use yum to upgrade other packages (openssh-server?)

  
Actual results:
Errors appear in /var/log/secure.  The new user is not created.

Additional info
This happens on both i386 and x86_64.

Comment 1 Simon Andrews 2008-09-15 13:23:43 UTC
Having looked at this a bit more, it seems that this error appears in the secure log when rpm tries to install a user which already exists.  Trying the same command from the spec file on the command line gets me:

useradd: user backuppc exists

..which makes sense, but /var/log/secure still says:

useradd[25979]: failed adding user `backuppc', data deleted

I'm not sure what the 'data deleted' means, or if this is a new message, but it's being reported in logwatch reports when I don't remember seeing it before.

The original report is incorrect in that it says that the user is not created.  It seems that this actually happens when the useradd fails because the user already exists.

Comment 2 Peter Vrabec 2008-09-16 08:38:21 UTC
# useradd foo
# useradd foo
useradd: user foo exists
# tail /var/log/secure
....
Sep 16 10:18:41 xen80 useradd[2023]: new group: name=foo, GID=501
Sep 16 10:18:41 xen80 useradd[2023]: new user: name=foo, UID=501, GID=501, home=/home/foo, shell=/bin/bash
Sep 16 10:18:46 xen80 useradd[2029]: failed adding user `foo', data deleted
# rpm -q shadow-utils
shadow-utils-4.1.1-4.fc9.i386

Simon, it seems this behaviour is common for shadow-utils for longer time. (at least shadow-utils-4.0.3). When something goes wrong useradd always just generate this syslog message. Note, it prints "useradd: user foo exists" on command line.

If you think this should be changed, please start some discussion on fedora-devel or shadow-utils upstream. It should be some consensus about it before we could start changing it.

Comment 3 Cristian G. 2012-09-06 20:29:10 UTC
i fix this error doing this:

1- mv /sbin/useradd /sbin/useradd.bin
2- create an script called '/sbin/useradd' whith the next code:

#!/bin/bash

/sbin/useradd.bin $@

exit 0


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