Bug 848929 - groupadd fails to rename group file across filesystem boundary
groupadd fails to rename group file across filesystem boundary
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
x86_64 Linux
unspecified Severity low
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-16 16:39 EDT by Michael Dale Long
Modified: 2012-08-17 02:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 702172
Last Closed: 2012-08-17 02:47:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Dale Long 2012-08-16 16:39:47 EDT
I was able to reproduce this bug in Fedora 16 with current updates (as of this writing).

+++ This bug was initially created as a clone of Bug #702172 +++

Description of problem:

Attempting to add a group fails because the call to rename /etc/group+ to /path/on/other/fs/group fails.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.  Move /etc/group to another filesystem (e.g. /mnt/group).
2.  Symlink /etc/group to /mnt/group
3.  Attempt to add a group with 'groupadd test'
Actual results:

Groupadd fails to add a group:
"groupadd: failure while writing changes to /etc/group"

Expected results:

Groupadd should add the group successfully.

Additional info:

From strace output, it appears that the call to rename('/etc/group+', '/mnt/etc/group') is the failure point.  A possible solution would be to ensure group+ is created in the same directory as group.

--- Additional comment from nikarul@yahoo.com on 2011-05-04 20:24:25 EDT ---

This appears to happen to passwd, shadow, and gshadow as well, probably for similar reasons.
Comment 1 Tomas Mraz 2012-08-17 02:47:29 EDT
Please report the issue upstream. I don't think this use-case is really important and useful.

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