Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 8040 - chown will not work on some account names
Summary: chown will not work on some account names
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-29 07:05 UTC by Richard Fairthorne
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-17 13:54:37 UTC


Attachments (Terms of Use)

Description Richard Fairthorne 1999-12-29 07:05:22 UTC
chown incorrectly identifies account names containing periods as being
invalid. You may only chown files to such users by using numeric user-id's.

I discovered this problem while writing a script on the SPARC platform,
but I'm hazarding a wild guess that it's not a SPARC specific problem.

Here's how to duplicate it.

useradd toecheese.com
mkdir any_dir
chown toecheese.com any_dir

The chown will fail.

Comment 1 Bernhard Rosenkraenzer 2000-01-17 13:54:59 UTC
It's not a bug, it's POSIX compliance.
You're not supposed to use a . in usernames.

chown toecheese.com blah

is equivalent to

chown toecheese file
chgrp com file

If you absolutely need to use a . in usernames, you can work around this by
using the User ID instead of the name, for example
chown `id toecheese.com` file

Comment 2 Bernhard Rosenkraenzer 2000-01-17 13:57:59 UTC
Sorry, `id -u toecheese.com` of course.


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