Bug 98912

Summary: redhat-config-users does not repliate symlinks from /etc/skel properly
Product: [Retired] Red Hat Linux Reporter: Joshua Penix <jpenix>
Component: libuserAssignee: Miloslav Trmač <mitr>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:57:00 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 Penix 2003-07-10 07:21:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686) Gecko/20030530 Galeon/1.3.5

Description of problem:
If /etc/skel contains a symlink, redhat-config-users trips over it when creating
new users.  It doesn't error out, but if you look in the new user directories,
the symlink will be linked to garbage as opposed to the intended directory.  In
some cases, the symlink garbage appears to contain the contents of other files
found in skel.

The same /etc/skel contents are successfully copied to new users created using
the 'useradd' command line tool.

Version-Release number of selected component (if applicable):
redhat-config-users-1.1.5-7

How reproducible:
Always

Steps to Reproduce:
1. Create a symlink in /etc/skel.  'ln -s /var/www/html web'
2. Use redhat-config-users to create a new user
3. ls -al /home/<newuser>
4. Note broken symlink
5. Use 'useradd' to create another new user
6. ls -al /home/<newnewuser>
7. Note proper symlink
    

Actual Results:  
[root@granite root]# ls -al /etc/skel/
total 28
drwxr-xr-x    2 root     root         4096 Jul  9 23:58 .
drwxr-xr-x   60 root     root         4096 Jul  9 23:20 ..
-rw-r--r--    1 root     root           24 Apr  9 06:02 .bash_logout
-rw-r--r--    1 root     root          191 Apr  9 06:02 .bash_profile
-rw-r--r--    1 root     root          124 Apr  9 06:02 .bashrc
-rw-r--r--    1 root     root          847 Feb 19 22:41 .emacs
-rw-r--r--    1 root     root          120 Feb 26 15:15 .gtkrc
lrwxrwxrwx    1 root     root           13 Jul  9 22:54 web -> /var/www/html

[root@granite root]# ls -al /home/test3
total 28
drwx------    2 test3    test3        4096 Jul  9 23:59 .
drwxr-xr-x    7 root     root         4096 Jul  9 23:59 ..
-rw-r--r--    1 test3    test3          24 Apr  9 06:02 .bash_logout
-rw-r--r--    1 test3    test3         191 Apr  9 06:02 .bash_profile
-rw-r--r--    1 test3    test3         124 Apr  9 06:02 .bashrc
-rw-r--r--    1 test3    test3         847 Feb 19 22:41 .emacs
-rw-r--r--    1 test3    test3         120 Feb 26 15:15 .gtkrc
lrwxrwxrwx    1 test3    test3          24 Jul  9 23:59 web ->
/var/www/html?}@????D???
[root@granite root]#


Expected Results:  
[root@granite root]# ls -al /home/test4/
total 28
drwx------    2 test4    test4        4096 Jul 10 00:20 .
drwxr-xr-x    8 root     root         4096 Jul 10 00:20 ..
-rw-r--r--    1 test4    test4          24 Jul 10 00:20 .bash_logout
-rw-r--r--    1 test4    test4         191 Jul 10 00:20 .bash_profile
-rw-r--r--    1 test4    test4         124 Jul 10 00:20 .bashrc
-rw-r--r--    1 test4    test4         847 Jul 10 00:20 .emacs
-rw-r--r--    1 test4    test4         120 Jul 10 00:20 .gtkrc
lrwxrwxrwx    1 root     root           13 Jul 10 00:20 web -> /var/www/html


Additional info:

Comment 1 Brent Fox 2003-12-01 21:14:48 UTC
Nalin says that this is a libuser problem.  Changing components.

Comment 2 Brent Fox 2003-12-01 21:16:44 UTC
Just for the record, I'm still able to reproduce this with Fedora Core 1.

Comment 3 Miloslav Trmač 2004-09-02 15:10:37 UTC

*** This bug has been marked as a duplicate of 87572 ***

Comment 4 Red Hat Bugzilla 2006-02-21 18:57:00 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.