Bug 143150 - adding user with existing home dir overwrites dot files
adding user with existing home dir overwrites dot files
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: firstboot (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Lumens
David Lawrence
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-16 16:23 EST by Joshua Jensen
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-13 14:10:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joshua Jensen 2004-12-16 16:23:29 EST
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 13:19:12 EDT
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 14:10:42 EST
This is fixed in Rawhide and will be fixed in the next major release of RHEL.
Comment 7 Joshua Jensen 2006-03-13 15:03:14 EST
Sweet, thank you Red Hat.

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