LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
LinkBack Search this Thread
Old 02-06-2004, 09:24 PM   #1
awesomejt
LQ Newbie
 
Registered: Jan 2004
Location: Flowery Branch, GA
Distribution: Fedora Core 1, various others
Posts: 26

Rep: Reputation: 15
Cannot add user with UPPER-case characters


I'm trying to add a user with upper case letters:

[root@webserver4 bin]# useradd JasonTaylor
useradd: invalid user name 'JasonTaylor'

Anyone got ideas?

Thanks. I didn't have this problem in RedHat 8 or 7.3.
 
Old 02-06-2004, 09:25 PM   #2
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: arch, slackware 10.2
Posts: 2,020

Rep: Reputation: 45
you could try the --force-badname option. that sometimes works with one of those commands (adduser or useradd), can't remember which.

>edit - it's the adduser command, info adduser:
Code:
     --force-badname
              By  default,  user  and group names are required to consist of a
              lowercase letter followed by zero or more lowercase  letters  or
              numbers.  Dashes  in  the  username  are accepted as well.  This
              option forces adduser and addgroup to be more lenient.

Last edited by synaptical; 02-06-2004 at 09:28 PM.
 
Old 02-06-2004, 09:50 PM   #3
awesomejt
LQ Newbie
 
Registered: Jan 2004
Location: Flowery Branch, GA
Distribution: Fedora Core 1, various others
Posts: 26

Original Poster
Rep: Reputation: 15
[root@webserver4 bin]# useradd --force-badname JasonTaylor
useradd: invalid option -- -
usage: useradd [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
useradd -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]
[root@webserver4 bin]# adduser --force-badname JasonTaylor
adduser: invalid option -- -
usage: adduser [-u uid [-o]] [-g group] [-G group,...]
[-d home] [-s shell] [-c comment] [-m [-k template]]
[-f inactive] [-e expire ] [-p passwd] [-M] [-n] [-r] name
adduser -D [-g group] [-b base] [-s shell]
[-f inactive] [-e expire ]

Looks like no such love -- at least on Fedora.
 
Old 02-06-2004, 09:58 PM   #4
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: arch, slackware 10.2
Posts: 2,020

Rep: Reputation: 45
n/m - didn't see adduser sandwiched in there.

fwiw, i got it to work once for me, then it wouldn't work anymore, either. it seems to be a squirrely command.

Last edited by synaptical; 02-06-2004 at 10:00 PM.
 
Old 02-09-2004, 08:01 AM   #5
awesomejt
LQ Newbie
 
Registered: Jan 2004
Location: Flowery Branch, GA
Distribution: Fedora Core 1, various others
Posts: 26

Original Poster
Rep: Reputation: 15
Yeah, was importing about 700 users from an old RH 8 box to the Fedora system. Tested a few accounts out to make sure they didn't screw up something with useradd. Since I'm migrating from RH 8 to Fedora, I wasn't sure when RH introduced this "feature". I ended up not fighting it and creating a new script to lowercase all the imported users and their repective home directories. I put a note on my website to tell all the users to login with all lowercase. I actually prefer that, but I had already allowed mixed case usernames. Really sux.

Thanks anyways.
 
Old 02-24-2006, 09:04 PM   #6
Uzma
LQ Newbie
 
Registered: Feb 2006
Location: Earth
Distribution: Ubuntu & Fedora & BSD on MSVPC
Posts: 10

Rep: Reputation: 0
I did a quick google search, but I can't find out why usernames have to begin with a lowercase letter.

Any links to sites that have the reasoning/history of this are much appreciated.
 
Old 07-18-2007, 07:19 PM   #7
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Rep: Reputation: 28
Same problem using Slackware 12.0

Seems silly -- if you like the command to automatically create the home directory, and other things, then you will have to remember to manually change anything after as needed. I can see why it might not like special characters, but why capitals?

I can't think why certain distros would deliberately limit useradd in that fashion.

So for now, I will (unfortunately) user all lowercase, and hopefully will remember when I login (I've gotten used to this name on Win-doze).
 
Old 07-18-2007, 09:34 PM   #8
hlingler
Member
 
Registered: May 2007
Location: Connellsville, PA, USA
Distribution: Fedora 8/9/10/11
Posts: 71

Rep: Reputation: 15
When I first installed Fedora, I merrily created myself a username starting with a capital V. Turns out that procmail - which sendmail uses by default in FC - can't handle uppercase letters without a special hack, which I never have figured out. Ever since, all internal system mail addressed to Vince bounces to root, with the procmail error: user Vince unknown. That's the only reason that I'm aware of for all-lowercase usernames.

Regards,
Vince
 
Old 07-18-2007, 09:57 PM   #9
ShellyCat
Member
 
Registered: Jul 2007
Distribution: Slackware 13
Posts: 178

Rep: Reputation: 28
Quote:
Originally Posted by hlingler
Turns out that procmail - which sendmail uses by default in FC - can't handle uppercase letters without a special hack
I suppose that's a good reason.

Is "sendmail" still maintained?
 
Old 07-18-2007, 10:08 PM   #10
hlingler
Member
 
Registered: May 2007
Location: Connellsville, PA, USA
Distribution: Fedora 8/9/10/11
Posts: 71

Rep: Reputation: 15
Yes, AFAIK. I've never been motivated enough to try an alternate MTA - my system mail is very low-volume - maybe Postfix (sic?) or others have no such problems. There may be other reasons to avoid uppercase letters in usernames that I'm not aware of - such as what the OP discovered.
 
Old 07-19-2007, 12:13 AM   #11
GregLee
Member
 
Registered: Feb 2004
Location: Waimanalo, HI
Distribution: Slackware 10, Fedora 6
Posts: 308

Rep: Reputation: 30
I just used useradd to add a user JasonTaylor on my system. There was no apparent difficulty. I checked in the file /etc/passwd to make sure the capitals were preserved. I'm not aware of any rule against having user names with capital letters (except it's in poor taste).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
upper case letter moonz Linux - General 3 09-18-2005 06:58 AM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
K3B problems upper case Veteq Linux - General 2 03-05-2004 11:42 PM
Apache and upper or lower case. dsiguy Linux - General 3 02-04-2003 11:02 AM


All times are GMT -5. The time now is 05:13 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration