Bug 92425 - upper case letters not allowed in user/group names
Summary: upper case letters not allowed in user/group names
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-05 23:47 UTC by webr
Modified: 2007-04-18 16:54 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-09-23 19:09:54 UTC
Embargoed:


Attachments (Terms of Use)

Description webr 2003-06-05 23:47:06 UTC
Description of problem:
cannot add username/group with any uppercase letters

Version-Release number of selected component (if applicable):


How reproducible:
useradd Bob

Steps to Reproduce:
1.useradd Bob
2.
3.
    
Actual results:
[root@newrh9test root]# useradd Bob
useradd: invalid user name 'Bob'

[root@newrh9test root]# useradd boB
useradd: invalid user name 'boB'

[root@newrh9test root]# groupadd Bob
groupadd: Bob is a not a valid group name

Expected results:
useradd Bob

Additional info:

This is a "install everything" test install of RH 9 
problem exists for any user/group utility ie adduser useradd groupadd etc.
all lowercase, numeric user/group names work fine, except for "."

No change after bringing system fully up2date

Comment 1 webr 2003-06-06 22:31:55 UTC
 strace useradd Bob
execve("/usr/sbin/useradd", ["useradd", "Bob"], [/* 25 vars */]) = 0
uname({sys="Linux", node="newrh9test.test.com", ...}) = 0
brk(0)                                  = 0x805fbe0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40016000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=88120, ...}) = 0
old_mmap(NULL, 88120, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40017000
close(3)                                = 0
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240\t\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=23688, ...}) = 0
old_mmap(NULL, 181312, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002d000
old_mmap(0x40032000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x4000) = 0x40032000
old_mmap(0x40033000, 156736, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40033000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220W\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1536292, ...}) = 0
old_mmap(0x42000000, 1261416, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x42000000
old_mmap(0x4212f000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x12f000) = 0x4212f000
old_mmap(0x42132000, 8040, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x42132000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x4005a000
set_thread_area({entry_number:-1 -> 6, base_addr:0x4005a4a0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0,
useable:1}) = 0
munmap(0x40017000, 88120)               = 0
brk(0)                                  = 0x805fbe0
brk(0x8060be0)                          = 0x8060be0
brk(0)                                  = 0x8060be0
brk(0x8061000)                          = 0x8061000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=30301680, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x4005b000
close(3)                                = 0
stat64("/etc/ptmp", 0xbfffe600)         = -1 ENOENT (No such file or directory)
access("/etc/shadow", F_OK)             = 0
access("/etc/gshadow", F_OK)            = 0
open("/etc/default/useradd", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=96, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40017000
read(3, "# useradd defaults file\nGROUP=10"..., 4096) = 96
socket(PF_UNIX, SOCK_STREAM, 0)         = 4
connect(4, {sa_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ENOENT
(No such file or directory)
close(4)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=1686, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40018000
read(4, "#\n# /etc/nsswitch.conf\n#\n# An ex"..., 4096) = 1686
brk(0)                                  = 0x8061000
brk(0x8062000)                          = 0x8062000
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40018000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=88120, ...}) = 0
old_mmap(NULL, 88120, PROT_READ, MAP_PRIVATE, 4, 0) = 0x4025b000
close(4)                                = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 4
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\35\0"..., 512) = 512
fstat64(4, {st_mode=S_IFREG|0755, st_size=52492, ...}) = 0
old_mmap(NULL, 47068, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x40018000
old_mmap(0x40023000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 4,
0xa000) = 0x40023000
close(4)                                = 0
munmap(0x4025b000, 88120)               = 0
open("/etc/group", O_RDONLY)            = 4
fcntl64(4, F_GETFD)                     = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=759, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40024000
read(4, "root:x:0:root\nbin:x:1:root,bin,d"..., 4096) = 759
close(4)                                = 0
munmap(0x40024000, 4096)                = 0
read(3, "", 4096)                       = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=2601, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40024000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2601
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x40024000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1
ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT
(No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/shadow.mo", O_RDONLY) = -1 ENOENT (No
such file or directory)
write(2, "useradd: invalid user name \'Bob\'"..., 33useradd: invalid user name 'Bob'
) = 33
exit_group(3)                           = ?





Comment 2 Brent Fox 2004-02-03 00:49:06 UTC
I believe that this is the intended behavior.  To my knowledge,
uppercase chars are not valid in Unix usernames.

Comment 3 Rogelio 2004-05-07 08:38:27 UTC
What about GROUP names? Why can't group names use uppercase letter, if
they always have in the past?


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