# Uppercase Letters in User Names

## GentooMN

Is there anyway to have Uppercase Letters in a users name in Gentoo?  I know this is a general limitation of UNIX, but Red Hat Allows for UCase Letters in User Names.  Usually this wouldn't be a big deal, but I'm setting up a Samba Server @ Work and most of the User ID's are mixed case.  And for the sake of Integrating Samba into the Network without having to give the users another Login & Password to remember, I was wondering if there's a work around for this.  Any help is greatly appreciated!

----------

## b_Q

Just created BB user

[b@Ath1-1 b]$su BB

Password: 

[BB@Ath1-1 b]$finger BB

Login: BB                               Name: (null)

Directory: /home/BB                     Shell: /bin/bash

Never logged in.

No mail.

No Plan.

HIH

----------

## rojaro

 *GentooMN wrote:*   

> And for the sake of Integrating Samba into the Network without having to give the users another Login & Password to remember, I was wondering if there's a work around for this.  Any help is greatly appreciated!

 

well, you should check the samba documentation. samba provides a user mapping facility which allows you to translate windows login names to unix usernames. check the /etc/samba directory - you'll find there a file called "smbusers"...

----------

## GentooMN

I use "superadduser" to manage system users, could the all lower case user names be a limitation of the program and not Gentoo?

----------

## rac

 *GentooMN wrote:*   

> I use "superadduser" to manage system users, could the all lower case user names be a limitation of the program and not Gentoo?

 

I just looked at superadduser - I don't see anything case-related in there.  What happens when you try to create, say, the user "GentooMN"?  Does "gentoomn" get created?  Do you get an error?

----------

## GentooMN

Yes, it errors out.  I believe it says something to the extent of "User Name is not valid", but I'm not 100% sure.  I'll run it on my system when I get home today and post the error output... Thanks!

----------

## pjp

```
# adduser GentooH

useradd: invalid user name 'GentooH'
```

----------

## GentooMN

If that's the case, then how did these other people add users with UCase letters in the user name?

----------

## pjp

I just manually added entries to /etc/passwd & shadow, that seemed to work.

----------

## rac

From gentoo-dev:

 *Quote:*   

> 	Well, the *bsd man page on passwd(5) has this to say:
> 
> ...
> 
>      The login name must never begin with a hyphen (`-'); also,
> ...

 

----------

## pjp

Red Hat alike useradd shell script

another adduser script..this one adds users with dots &

----------

## atac

these scripts are not good enough for me, since i'm using pam_ncp_auth to create accounts on the fly it would put me in a very timespending situation to edit the source code for that module to fit these user add scripts.

might i be possible to just copy the executable useradd script from redhat ?

----------

## pjp

I'm not clear on when binaries can and can't be used.  Are we certain that RH is using a modified source vs. a script wrapper?

If RH is using modified source, an ebuild would probably be pretty easy.  Anyone have a link to the source?

----------

## atac

i don't know, i'll look for it later  :Smile: 

----------

