Home /Linux /How To Add and Delete Users on Ubuntu 12.04 and CentOS 6

How To Add and Delete Users on Ubuntu 12.04 and CentOS 6

How to Add a User on Ubuntu 12.04

To add a new user in Ubuntu, use the adduser command, replacing the “newuser” with your preferred username

sudo adduser <span class="highlight">newuser

As soon as you type this command, Ubuntu will automatically start the process:

  • Type in and confirm your password
  • Enter in the user’s information. This is not required, pressing enter will automatically fill in the field with the default information
  • Press Y (or enter) when Ubuntu asks you if the information is correct

How to Grant a User Root Privileges

As mentioned earlier, you are much better off using a user with root privileges.

You can create the sudo user by opening the sudoers file with this command:

sudo /usr/sbin/visudo

Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.

User privilege specification


<span class="highlight">newuser</span> ALL=(ALL:ALL) ALL


How to Delete a User

Should you find that you find that you no longer want to have a specific user on the virtual private server you can delete them with a single command.

sudo userdel <span class="highlight">newuser


Answers (7)

  1. best mouthwash
    March 11, 2015 at 6:33 am

    I’m really loving the theme/design of your weblog.
    Do you ever run into any internet browser compatibility issues?
    A number of my blog audience have complained about my website not operating correctly in Explorer but looks great in Firefox.

    Do you have any advice to help fix this issue?

    1. April 15, 2016 at 8:17 pm


      You can solve the isse in the Explorer by the before class add the “*” then that class is worked for the only Explorer,

      Other then you can check the Source code, Some Tag is missing, after resolving the tag issue then auto fixed the problem


  2. cursoexperto.Com
    March 11, 2015 at 6:41 am

    You may also use Nutronics Laboratories Weight Loss Furthermore together with any one
    of our igf 1 liposome spray items for optimal effects.

  3. rice cooker reviews
    March 11, 2015 at 6:58 am

    It’s very simple to find out any matter on web as compared to books, as I
    found this article at this web page.

  4. robot vacuum reviews for pet hair
    March 11, 2015 at 9:00 am

    The top robotic cleaners offer clever cleaning habits, various motions to make sure
    that many floorboards locations are washed.

  5. MayfairOfficeSpace
    March 11, 2015 at 9:20 am

    Hello to all, the contents existing at this web site are in fact awesome for people knowledge, well,
    keep up the good work fellows.

  6. garage doors San Jose CA
    March 11, 2015 at 9:32 am

    Thanks for finally writing about >How To Add and Delete Users on Ubuntu 12.04 and
    CentOS 6 | Code Hi Code <Loved it!

Leave a Reply