LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2003, 04:31 PM   #1
tplessers
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.1
Posts: 8

Rep: Reputation: 0
Question User names with a dot?


Hi there,

I'm migrating my company's Windows 2000 domain to a Samba domain. In our windows domain, we have user names like "john.doe" or "ema.nymton". Very easy because it includes first name and last name (like our email addresses, etc). Is this also possible in Unix / Linux, because untill now, whenever I tried to add a user with a dot, it tells me it's invalid. Editing /etc/passwd directly and trying to change that user's password with /usr/bin/passwd doens't work. Do I need a escape char or something? All help / comments / advise welcome. Thanks.

Timpie.
 
Old 11-06-2003, 08:22 PM   #2
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
definetely yes, it can add user with dot for ex: john.doe.
can you give us some error messages when try to add user with dot?
 
Old 11-07-2003, 02:45 AM   #3
tplessers
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
Well, when I open a console and type (as root)

# adduser john.doe
adduser: invalid user name 'john.doe'

When I open up Mandrake's user management program, and try to add a user named john.doe, it gives the error :

The user name must contain only lower cased letters, number, '-' and '_'

When I simply edit /etc/passwd and add the line:
john.doe:x:505:100:John Doe:/home/john.doe:/bin/bash
save, quit and type:

# passwd john.doe
Changing password for user john.doe
passwd: Authentication token manipulation error

I use shadow passwords, perhaps that has something to do with it?

Greets,
Timpie
 
Old 11-07-2003, 02:54 AM   #4
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
Quote:
Originally posted by tplessers
Well, when I open a console and type (as root)

# adduser john.doe
adduser: invalid user name 'john.doe'

When I open up Mandrake's user management program, and try to add a user named john.doe, it gives the error :

The user name must contain only lower cased letters, number, '-' and '_'

When I simply edit /etc/passwd and add the line:
john.doe:x:505:100:John Doe:/home/john.doe:/bin/bash
save, quit and type:

# passwd john.doe
Changing password for user john.doe
passwd: Authentication token manipulation error

I use shadow passwords, perhaps that has something to do with it?

Greets,
Timpie
Ok lets make it clear first, i think the command you given was wrong, it should be :
useradd john.doe
not
adduser john.doe
 
Old 11-07-2003, 03:02 AM   #5
tplessers
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
In Mandrake 'adduser' is a symbolic link to 'useradd'. I was too lazy to check which one was the real command. Anyway, doing:

# useradd john.doe
useradd: invalid user name 'john.doe'

gives the same problem.

Timpie.
 
Old 11-07-2003, 03:20 AM   #6
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
try to use root priviledge to add user
su -
enter your passwd
useradd john.doe
 
Old 11-07-2003, 03:23 AM   #7
tplessers
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
I am root when performing the commands.

Timpie.
 
Old 11-07-2003, 06:57 AM   #8
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
I tried to add a user, as root, in my Mandrake 9.1 and got the same errors he got. It don't like the "." for some reason. I tried in several different places.

Can you replace that with something else or just leave out the "."?

There is likely a reason that it don't like it. I don't know what it is though.

Later

 
Old 11-14-2003, 08:18 AM   #9
tplessers
LQ Newbie
 
Registered: Nov 2003
Distribution: Mandrake 9.1
Posts: 8

Original Poster
Rep: Reputation: 0
Just letting you guys know I found the solution. Since Mandrake 9.1 / Redhad 9.0 / ... they don't allow dots anymore in 'useradd'. However, you can use the command 'luseradd' which still has all features like using dots. I find this very confusing. Why on earth would someone disallow use of dots in usernames? Anyway, you can also edit /etc/passwd and /etc/shadow yourself. Then doing a passwd on the newly created user lets you change the password.

Greets,
Tim.
 
Old 12-02-2003, 10:27 AM   #10
GrimaceCX
Newbie
 
Registered: Dec 2003
Location: Knysna, South Africa
Distribution: Mandrake 9.2 and Fedora 2
Posts: 6

Rep: Reputation: 0
Unhappy almost there!

Hi Guys.
With great excitement I read through the posts, but alas I get the following error...
Error creating group `jon.doe'.
Not surprisingly there is nothing in the passwd or shadow file to edit regarding the user as nothing was completed.
Any suggestions from here would be greatly appreciated (Mandrake 9.2)
Shot.
 
Old 12-03-2003, 06:51 AM   #11
GrimaceCX
Newbie
 
Registered: Dec 2003
Location: Knysna, South Africa
Distribution: Mandrake 9.2 and Fedora 2
Posts: 6

Rep: Reputation: 0
Cool

Hi again...
Just a note - on our mail server running 9.1, the luseradd command worked like a treat with the "." in the name, but on the new 9.2 I'm getting the error in the last post - "Error creating group 'j.doe'"
Any brilliant ideas?
Cheers
 
Old 12-03-2003, 08:50 AM   #12
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 79
Out of curiosity, try putting quotes around it, the whole user name. That works for filenames that have a space, may work.

Later

 
Old 12-03-2003, 09:15 AM   #13
GrimaceCX
Newbie
 
Registered: Dec 2003
Location: Knysna, South Africa
Distribution: Mandrake 9.2 and Fedora 2
Posts: 6

Rep: Reputation: 0
Thanks Dalek
Tried it (luseradd "jon.doe") but still get the same error (Error creating group `jon.doe'.)
This is insane - considering going back to 9.1!!!
Cheers..
 
Old 12-03-2003, 09:20 AM   #14
guygriffiths
Member
 
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524

Rep: Reputation: 37
What happens if you try to create the group first (with groupadd, or maybe in this case lgroupadd)?
 
Old 12-03-2003, 10:25 AM   #15
GrimaceCX
Newbie
 
Registered: Dec 2003
Location: Knysna, South Africa
Distribution: Mandrake 9.2 and Fedora 2
Posts: 6

Rep: Reputation: 0
hey Guy
This is what I get.....

[root@mail root]# lgroupadd jon.doe
Group creation failed.
[root@mail root]# groupadd jon.doe
groupadd: jon.doe is a not a valid group name

so the lgroupadd tries, and the groupadd simply isn't interested!! grrrr
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex user names future assassin Linux - Security 3 08-08-2005 10:48 PM
How to add user with dot in between manya Linux - Security 2 08-12-2004 07:41 AM
useradd not accepting dot so i am not able to use dot in mail id hanu_raob Linux - General 5 05-13-2004 07:04 AM
How can user names be changed? petercool LQ Suggestions & Feedback 4 05-19-2003 08:59 AM
User names neo77777 General 8 08-10-2002 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration