Advanced

adding user starting with caps letter fails on linux

Forum: LinuxTotal Replies: 8
Author Content
raja

Jan 10, 2005
7:14 AM EST
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
7:39 AM EST
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
8:28 AM EST
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
6:26 PM EST
FeriCyde,

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

- raja
PaulFerris

Jan 11, 2005
7:14 AM EST
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
8:15 AM EST
Maybe this is the reason?

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

dave
PaulFerris

Jan 11, 2005
8:35 AM EST
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
4:29 AM EST
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
4:38 AM EST
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.

Post a reply to this thread:

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post