61

Specifically, what commands do I run from the terminal?

Konrad Borowski
  • 10,745
  • 3
  • 55
  • 71
quackingduck
  • 5,597
  • 5
  • 27
  • 22

3 Answers3

133

Without a home directory

sudo useradd myuser

With home directory

sudo useradd -m myuser

Then set the password

sudo passwd myuser

Then set the shell

sudo usermod -s /bin/bash myuser
Dave Jarvis
  • 29,586
  • 38
  • 176
  • 304
quackingduck
  • 5,597
  • 5
  • 27
  • 22
  • unfortunately, I indeed follow this to add a user, and then get the error 'Access denied' when I try to sign in with it. What's wrong with it? – Brady Zhu Sep 17 '13 at 06:03
31

Here's the command I almost always use (adding user kevin):

useradd -d /home/kevin -s /bin/bash -m kevin
Dave Jarvis
  • 29,586
  • 38
  • 176
  • 304
Liberty
  • 311
  • 1
  • 4
  • 2
15

There's basicly 2 commands to do this...

  • useradd
  • adduser (which is a frendlier front end to useradd)

You have to run them has root. Just read their manuals to find out how to use them.

skinp
  • 3,897
  • 4
  • 25
  • 20