Bug 143150 - adding user with existing home dir overwrites dot files
Summary: adding user with existing home dir overwrites dot files
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: firstboot
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Chris Lumens
QA Contact: David Lawrence
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-16 21:23 UTC by Joshua Jensen
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2006-03-13 19:10:42 UTC

Attachments (Terms of Use)

Description Joshua Jensen 2004-12-16 21:23:29 UTC
Description of problem:

Where's my .bashrc?!!  When I install RHEL4 Beta 2, and mount an
existing partition to /home, I can add a username during firstboot who
already has a directory... however the useradd that is performed
overwrites that user's ~/.bashrc (and other) files.  Can't there be
some logic to detect if those files already exist, and not overwrite
them?  It may be easier to just not do anything related to
creating/populating home dirs if said user's home directory already

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

RHEL 4  Beta 2

Comment 2 Chris Lumens 2005-10-11 17:19:12 UTC
The easiest fix here is to just not allow you to create a user if a home
directory by the same name already exists.  useradd doesn't have any options to
only copy files from /etc/skel that don't already exist in the home directory. 
The best I can do there is to bounce the bug to the appropriate package and ask
for such an option.  I don't want to duplicate the skel handling code inside

Adding to the proposed list with the suggestion that we error if a home
directory with the same name as the created user already exists.

Comment 6 Chris Lumens 2006-03-13 19:10:42 UTC
This is fixed in Rawhide and will be fixed in the next major release of RHEL.

Comment 7 Joshua Jensen 2006-03-13 20:03:14 UTC
Sweet, thank you Red Hat.

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