Bug 571653

Summary: wrong parameter for useradd
Product: [Fedora] Fedora EPEL Reporter: Frank Büttner <bugzilla>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: low    
Version: el5CC: bugzilla, dcantrell, mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.0.7-1.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-10 07:03:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 565181    

Description Frank Büttner 2010-03-09 07:03:54 UTC
Description of problem:
After update to the last version an build of packages is imposable 

Version-Release number of selected component (if applicable):
mock-1.0.5-1.el5

How reproducible:
everytime

Steps to Reproduce:
1. run mock with "mock -r epel-5-x86_64 pathToSRPM"
  
Actual results:
get the error:
ERROR: Command failed. See logs for output.
 # /usr/sbin/useradd -o -m -u 500 -g 109 -d /builddir -N mockbuild


Expected results:
working build

Comment 1 Frank Büttner 2010-03-09 07:05:08 UTC
locking at the log files I see:
DEBUG util.py:280:  Executing command: /usr/sbin/useradd -o -m -u 500 -g 109 -d /builddir -N mockbuild
DEBUG util.py:256:  /usr/sbin/useradd: Ungültige Option -- N
DEBUG util.py:256:  Usage: useradd [options] LOGIN
DEBUG util.py:256:  Options:
DEBUG util.py:256:    -b, --base-dir BASE_DIR   base directory for the new user account
DEBUG util.py:256:                              home directory
DEBUG util.py:256:    -c, --comment COMMENT             set the GECOS field for the new user account
DEBUG util.py:256:    -d, --home-dir HOME_DIR   home directory for the new user account
DEBUG util.py:256:    -D, --defaults            print or save modified default useradd
DEBUG util.py:256:                              configuration
DEBUG util.py:256:    -e, --expiredate EXPIRE_DATE      set account expiration date to EXPIRE_DATE
DEBUG util.py:256:    -f, --inactive INACTIVE   set password inactive after expiration
DEBUG util.py:256:                              to INACTIVE
DEBUG util.py:256:    -g, --gid GROUP           force use GROUP for the new user account
DEBUG util.py:256:    -G, --groups GROUPS               list of supplementary groups for the new
DEBUG util.py:256:                              user account
DEBUG util.py:256:    -h, --help                        display this help message and exit
DEBUG util.py:256:    -k, --skel SKEL_DIR               specify an alternative skel directory
DEBUG util.py:256:    -K, --key KEY=VALUE               overrides /etc/login.defs defaults
DEBUG util.py:256:    -m, --create-home         create home directory for the new user
DEBUG util.py:256:                              account
DEBUG util.py:256:    -l,                       do not add user to lastlog database file
DEBUG util.py:256:    -M,                       do not create user's home directory(overrides /etc/login.defs)
DEBUG util.py:256:    -r,                       create system account
DEBUG util.py:256:    -o, --non-unique          allow create user with duplicate
DEBUG util.py:256:                              (non-unique) UID
DEBUG util.py:256:    -p, --password PASSWORD   use encrypted password for the new user
DEBUG util.py:256:                              account
DEBUG util.py:256:    -s, --shell SHELL         the login shell for the new user account
DEBUG util.py:256:    -u, --uid UID                     force use the UID for the new user account
DEBUG util.py:256:    -Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
DEBUG util.py:319:  Child returncode was: 2

Comment 2 Jesse Keating 2010-03-09 15:36:58 UTC
Do you have custom epel configs, that have a .rpmnew file sitting next to them?  The useradd default was either wrong for Fedora, or wrong for EL, so we changed the default and overrode the default in the epel config files we ship.

Comment 3 Frank Büttner 2010-03-10 07:03:15 UTC
Hello,
yes there was an rpnew file.
And after add the line
"config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s -n %(user)s'"
to the old one, all will be work again.
Thanks.

Comment 4 Fedora Update System 2010-03-11 22:28:09 UTC
mock-1.0.7-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.7-1.el5

Comment 5 Fedora Update System 2010-04-26 23:26:30 UTC
mock-1.0.7-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.