An Exploring South African

Things to do in Cape Town, the Helderberg, and the Cape Winelands

Menu

Skip to content
  • About
  • Explore

How to Create an User on an Ubuntu Server CodeUnit 10 OCT 2011

There are two commands which you can use to create an user account on an Ubuntu Server installation. The first command is the adduser command which is not very flexible but is user friendly in that it prompts you for data with each and every step in the creation process.

The other more flexible command is useradd. Simply calling it with the desired username as a parameter will create a user account, but without listing extra options this user account won’t have a password or even a home directory. One of the better ways of calling it then is as such:

sudo useradd -d /home/newuseraccount -m newuseraccount
sudo passwd newuseraccount

The above will add a new user on the system with the username “newuseraccount”. The -d option specifies where to create the home directory and the -m forces the creation of your specified directory. Note it copies files for the new home directory from the /etc/skel folder. Although we could have specified a password by using the -p option, it might be a better idea to stick with the classic passwd call to do this.

Nifty.

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Monday 10/10/2011CodeUnitadd user, adduser, create user, ubuntu, ubuntu server, user account, useraddCraig Lotter

About Craig Lotter

Software developer, husband and dad to two little girls. Writer behind An Exploring South African. I don't have time for myself any more. View all posts by Craig Lotter →

Post navigation

← Arthur Suydam: Ghost Rider Volume 6 #33 Cover (2009) Waxy Hearing →

An Exploring South African

Curiosity, travel, and discovering new places. Craig Lotter's An Exploring South African is primarily a South African travel blog of things to do in and around Cape Town, the Helderberg, and the Cape Winelands.

Craig Lötter

A South African software developer at Touchwork, Craig Lotter is a husband to a cake baker, father to two young girls, and someone who is constantly looking for new places to explore. He is also not that bad of a writer either.

   

Instagram

Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new content via email.

Copyright © 2007-2021 Craig Lotter | Rugged Rock Studio | Proudly powered by WordPress