Bug 143150

Summary: adding user with existing home dir overwrites dot files
Product: Red Hat Enterprise Linux 4 Reporter: Joshua Jensen <joshua>
Component: firstbootAssignee: Chris Lumens <clumens>
Status: CLOSED NEXTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: pvrabec
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-13 19:10:42 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:

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
exists.

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
firstboot.

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.