Custom Search

Ubuntu add user command line

After working some times with Ubuntu, maybe it's time you need to create a new user account in your system. There are two common ways of creating user account in Ubuntu. One is using the traditional Linux useradd command. The other one is adduser command.

The different between useradd and adduser command:
  1. The useradd command is a lower level utility to create user. That means like other traditional Unix commands, it's powerful, has many options that you can use to customize user account such as home directory and groups.
  2. The adduser command is an upper level utility to create user. The command is suitable for new system administrator or new Ubuntu server user. It guides user step by step and automatically create user id(uid), group id(gid), create home directory, and copying files from `/etc/skel' to user home directory.
This is an example of Ubuntu add user command line:

luzar@ubuntu:~$ adduser aura
adduser: Only root may add a user or group to the system.
luzar@ubuntu:~$ sudo adduser aura
[sudo] password for luzar:
Adding user `aura' ...
Adding new group `aura' (1001) ...
Adding new user `aura' (1001) with group `aura' ...
Creating home directory `/home/aura' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for aura
Enter the new value, or press ENTER for the default
Full Name []: auravisya
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [y/N] y

That's very easy, isn't it?

No comments:

Post a Comment

Please keep comment relevant and strictly no spam will be tolerated. Thank you.