adding user starting with caps letter fails on linux

Forum: LinuxTotal Replies: 8
Author Content
raja

Jan 10, 2005
8:14 AM EDT
I tried to add user with name 'NewUser' and got following message -

useradd: invalid user name 'NewUser'

Can someone help me to know the reason behind it?

Thanx raja
PaulFerris

Jan 10, 2005
8:39 AM EDT
raja,

I tried this just now on a Suse system -- worked fine like this:

# useradd NewUser

And, to remove:

# userdel NewUser

I think you should be fine -- what distribution?

--FeriCyde

TxtEdMacs

Jan 10, 2005
9:28 AM EDT
raja: If you are using 10.1 Mandrake (do not remember how 10.0 behaved) I had to take out all my caps for the user name using their "Drake..." tool. If it works from the command line as suggested above, go that route.
raja

Jan 10, 2005
7:26 PM EDT
FeriCyde,

I am using RedHat and getting problem on executing command useradd NewUser

- raja
PaulFerris

Jan 11, 2005
8:14 AM EDT
raja: there is no other user like "newuser" in /etc/passwd already?

If so, that might be the problem -- if not, try adding that user (newuser), then as root, edit /etc/passwd, and change it to say "NewUser" - only in the first column where that name appears (before the first colon:) -- don't put any spaces in there.

Should work fine.

--FeriCyde
dave

Jan 11, 2005
9:15 AM EDT
Maybe this is the reason?

http://lists.samba.org/archive/samba/2001-October/030358.htm...

dave
PaulFerris

Jan 11, 2005
9:35 AM EDT
That might do it if he were entering them from a text file -- like shown in that link -- but I was under the impression that he was adding right off the CLI...

--FeriCyde

dave

Jan 12, 2005
5:29 AM EDT
My guess is he is using an ssh tool from a Windows or Mac, and that tool is sending an extra ^M character.

Dave
PaulFerris

Jan 12, 2005
5:38 AM EDT
interesting theory, although I've used different proprietary and open versions of ssh, and never run into this kind of thing. The interpretors usually don't add the wrong terminator -- just the files themselves tend to have these kind of problems.

You cannot post until you login.