How do I add a user in Ubuntu? [closed]
Asked Answered
J

3

69

Specifically, what commands do I run from the terminal?

Jahdai answered 1/9, 2008 at 18:59 Comment(0)
J
142

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
Jahdai answered 1/9, 2008 at 18:59 Comment(1)
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?Anticlerical
I
34

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

useradd -d /home/kevin -s /bin/bash -m kevin
Ipoh answered 17/1, 2010 at 10:43 Comment(0)
P
17

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.

Practiced answered 1/9, 2008 at 19:3 Comment(1)
The adduser is so efficiently.Blankbook

© 2022 - 2024 — McMap. All rights reserved.