Information
This is out of date, the “User Accounts” app has changed in Ubuntu 11.10 and no longer has many functions.
When Ubuntu and/or Kubuntu are initially installed, a single user account was created. It is possible to create additional user logins on your system.
Options
There is more than one way to add a user, however this wiki page will briefly discuss the easiest and most common ways. The two ways shown are:
- Graphical
- Command-line – adduser
Command-line
To add a user you must use the sudo command (for an explanation of what that means, see the RootSudo page). Here are the commands:
To add a user. NOTE: do not use the useradd command.
1 |
$ sudo adduser <username> |
To see the options for adding a user try the man command.
1 |
$ man adduser |
Here is a useful example of the useradd command. Why use useradd? It gives a few more options for special cases. To add a user, give her a standard home directory in the /home folder and specify the shell she accesses by default do this:
1 2 |
$ sudo useradd username -m -s /bin/bash $ sudo passwd username |
Groups
You might also wish to create a new group for your users.
1 |
# sudo addgroup <groupname> |
To add a new user to a existing group you would do this:
1 |
# sudo adduser <username> audio |
To add an existing user to an existing group you can use the same command:
1 |
# sudo adduser <username> <groupname> |
or
1 |
# sudo usermod -aG <groupname> <username> |
Ref: help.ubuntu.com