Red Hat Bugzilla – Bug 848929
groupadd fails to rename group file across filesystem boundary
Last modified: 2012-08-17 02:47:29 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):
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'
Groupadd fails to add a group:
"groupadd: failure while writing changes to /etc/group"
Groupadd should add the group successfully.
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 email@example.com on 2011-05-04 20:24:25 EDT ---
This appears to happen to passwd, shadow, and gshadow as well, probably for similar reasons.
Please report the issue upstream. I don't think this use-case is really important and useful.