You are not logged in.

#1 2019-07-25 14:05:12

Zayed_
Member
Registered: 2019-07-23
Posts: 12

[SOLVED] Cannot create users using useradd

Hey. I was just trying to create a user using useradd, but it always returns invalid username 'username'. I searched a lot but couldn't find anything on it other than not allowing dot in username which I wasn't using anyway. Any way to fix this?

Last edited by Zayed_ (2019-07-27 06:59:21)


"Never give up!" - Anonymous

Offline

#2 2019-07-25 14:15:34

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: [SOLVED] Cannot create users using useradd

Please post the full command you used and its output.

Offline

#3 2019-07-25 23:45:08

Zayed_
Member
Registered: 2019-07-23
Posts: 12

Re: [SOLVED] Cannot create users using useradd

loqs wrote:

Please post the full command you used and its output.

useradd -m LinuxUser
useradd: invalid username 'LinuxUser'


"Never give up!" - Anonymous

Offline

#4 2019-07-25 23:53:32

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: [SOLVED] Cannot create users using useradd

Please see the CAVEATS sections of man 8 useradd.

Offline

#5 2019-07-26 00:15:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [SOLVED] Cannot create users using useradd

Zayed_ wrote:

I searched a lot but couldn't find anything on it other than not allowing dot in username ...

I just tried several variations on 'valid linux username' and 'legal linux username' and all of them produce the same rule as is elaborated in the manual page as the very first result.  One should search before asking here, but I think it's slightly less off to simply neglect to search than to claim you did when you clearly did not.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2019-07-26 11:02:20

Zayed_
Member
Registered: 2019-07-23
Posts: 12

Re: [SOLVED] Cannot create users using useradd

Trilby wrote:
Zayed_ wrote:

I searched a lot but couldn't find anything on it other than not allowing dot in username ...

I just tried several variations on 'valid linux username' and 'legal linux username' and all of them produce the same rule as is elaborated in the manual page as the very first result.  One should search before asking here, but I think it's slightly less off to simply neglect to search than to claim you did when you clearly did not.

Damn. I'm really sorry. Didn't check properly, I guess? How do I close/delete the thread?


"Never give up!" - Anonymous

Offline

#7 2019-07-26 11:30:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,493

Re: [SOLVED] Cannot create users using useradd

Either edit your initial post and change the subject (prepend "[SOLVED]") or report the original post for deletion. Links are on the bottom of the post.

Offline

#8 2019-07-26 13:43:59

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: [SOLVED] Cannot create users using useradd

Please don't delete the thread. You have learned something from it, so maybe one day someone else will as well. Just mark it as SOLVED.

Last edited by twelveeighty (2019-07-26 13:44:33)

Offline

Board footer

Powered by FluxBB