Ubuntu has two commands for this, useradd and adduser, where adduser is the easier one for newbies, while useradd is more flexible but has a lot of ways you can get it wrong. In fact, 'man useradd' recommends using adduser instead.
Unfortunately, that how-to page starts with useradd, and the first example on the page is:
It isn't until later on the page that it mentions that there are some options you must add to the command if you want it to set up everything correctly for a typical user. And if you leave these options out, the page doesn't explain how to fix it after the fact.
Finally, near the bottom of the page it mentions the adduser command that would have worked with no special options and no hassles.
So, being at the time a Linux newbie, I worked through the how-to and tried the useradd command it suggested, got myself into a situation where I wasn't sure exactly what I'd really done and hadn't done, then finally discovered the adduser command I should have used in the first place. I posted a reasonably polite complaint that the how-to had led me down the wrong path and it ought to start with the recommended adduser command instead of just mentioning it in passing at the end.
The responses I got were fairly eye-opening. (Click the "show archived reader comments (36)" link to see them.)
This one was my favorite:
> Michael Greary [sic] you are a D&%K H#$&D. You’re the 1 that messed it up no1 else, and anyone else for that matter.
> Hopefully you’ve learnt by now that when blindly running linux commands you should read the whole article to make sure it’s what you want first.
> Blaming it on other ppl isn’t gonna help either. You should’ve said it by admitting your mistake, asking for a way to rectify it.
> (sigh) I bet you have no friends
I have to admit he was right. Clearly, I am not worthy of using Ubuntu!
I searched for an alternative. The second Google result for 'add user ubuntu' is: https://help.ubuntu.com/community/AddUsersHowto
There are problems:
* The article has a pants title - no novice in their right mind is going to click the link over the first result with the better title
* It begins with a tag saying it's out of date
* It's marked as immutable so those who care can't make it better.
What can we do to make these terrible articles go away?
So, yeah, you
a) didn’t read the manuals supplied with your distribution
b) instead went directly to a random third party site via Google
c) blindly trusted said site without fully reading it
d) messed up while doing so.
You should have gotten a computer-literate friend to help you, just as you don’t fix your car by looking for an howto online and dismissing the manual you can usually find in the glove compartment.
The thing is, of course I know I screwed up. I don't need you or anyone else to tell me that. I already know it.
But that has nothing to do with my complaint: the top match for a Google search for "ubuntu add user" is a site that gives out poor quality information, doesn't improve that information as a result of user feedback, and has a community that is positively hostile to feedback. Yes, as you point out, there were also helpful comments in that thread. There were also several other people who had the same problem I did, and the site never did anything to improve its content.
Isn't it obvious that this was a lousy tutorial? Doesn't the author of a site like this have any responsibility to put out useful information? Does the fact that I screwed up make my feedback any less valuable? If you're writing tutorials, that's exactly the kind of feedback you ought to be looking for, so you can improve your tutorials.
Contrast it with Arch Linux's page on user management:
> To add a new user, use the useradd command:
> # useradd -m -g [initial_group] -G [additional_groups] -s [login_shell] [username]
Here they do use the same useradd command that I was complaining about (probably because Arch doesn't include adduser by default?), but they give a complete example with all the options required, followed by an explanation of those options.
Now that's how you do it.
But we're all newbies at something, some of the time. In my case it was basic Linux user setup.
Maybe you even screwed something up once, as a result of somebody giving you bad information that you didn't thoroughly check out. (Not saying you did, just possible.) If that ever happened, which would be a better response from the source of that information: chewing you out thoroughly, or correcting the bad information?
Except... we have douchebags in the community who talk shit to newbies and then cry, "Why does everyone use Windows? How come Linux isn't more widely used?"
Just check your post history and read the number of times you wrote "RTFM." That's why.
Not being careful of that second one gets us things like the GNOME 3/Unity/Windows 8 design-by-committee that seems to be loathed so much by power users.
Is it so wrong to expect some basic minimum level of competence in a system before someone uses it? And then suggest that someone take the most basic of steps to acquire that competence before asking questions? (By R'ing TFM?)
Systems should as a rule be somewhat intuitive (IMNSHO), but you can only take that so far before you start hamstringing yourself. Devs would never get anything done if they spent all their time training people how to use systems.
Remember that everyone starts out incompetent. They ask dumb questions, and in some cases entitled newbies expect the experts to bend over backwards for them. But one thing that's nice is that a lot of questions have been answered before by patient experts.
Say there's a guy on the Ubuntu forums who asks the following question:
"Hey, how do I change my desktop resolution?"
An asshole answer is "Fucking Google it, idiot. It's not hard."
A decent answer is, "Here's a link to the answer. In the future, I suggest Googling your issue. You don't have to wait for us to answer it! Often, questions have been asked and answered before. We're here if you get stuck, though."
This has a few benefits. The first (obvious) benefit is that the newbie doesn't immediately think "Wow. What a dick, I was just asking a simple question."
The second benefit is that future newbies who Google the same question get a link to the answer.
Of course, there are lost causes (Where's the Start button? This isn't like Windows at all. I don't like it) and asshole newbies who simply refuse to try to learn anything by themselves, (Ok, you answered my question on desktop resolution. How do I change my desktop background?) but I think these people are the exception rather than the norm. And they can be dealt with in a way that is constructive rather than crass and uncouth.
Fortunately, you can easily killfile people in mailing lists, and doing so quickly (i.e. after one wrong post) helped me greatly.