[Bug 738114] New: usermod chowns files to the wrong user/group
https://bugzilla.novell.com/show_bug.cgi?id=738114 https://bugzilla.novell.com/show_bug.cgi?id=738114#c0 Summary: usermod chowns files to the wrong user/group Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: i686 OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: frank.lichtenheld@sophos.com QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20111108 Iceweasel/3.5.16 (like Firefox/3.5.16) usermod from pwdutils does a recursive chown on the users home directory if you change his numerical uid and/or gid. This works fine for files/dirs that are owned by the user and his primary group and does nothing for files not owned by the user and not owned by his primary group. However if files/dirs are owned by the user and a random other group or by the users primary group and a random other user those will afterwards be owned by the user and its primary group. That is probably not the intended behavior. Reproducible: Always Steps to Reproduce: # useradd -m testuser # tail -n1 /etc/passwd testuser:x:1011:100::/home/testuser:/bin/bash # cd /home/testuser/ # touch foo # chown testuser foo # ls -l foo -rw-r--r-- 1 testuser root 0 Dec 21 18:00 foo # usermod -u 7777 testuser Actual Results: # ls -l foo -rw-r--r-- 1 testuser users 0 Dec 21 18:00 foo As you can see foo has changed group from "root" to "foo" Expected Results: # ls -l foo -rw-r--r-- 1 testuser root 0 Dec 21 18:00 foo I've encountered this on a SLES11SP1 system, but it is not fixed in Factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c1
--- Comment #1 from Frank Lichtenheld
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c
zj jia
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c2
--- Comment #2 from Thorsten Kukuk
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c3
--- Comment #3 from Frank Lichtenheld
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c4
Thorsten Kukuk
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c5
Thorsten Kukuk
https://bugzilla.novell.com/show_bug.cgi?id=738114
https://bugzilla.novell.com/show_bug.cgi?id=738114#c6
--- Comment #6 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com