Add Administrator Account in Ubuntu

Source: Internet
Author: User
By default, only the account used during installation of Ubuntu is the system administrator account and does not grant root user permissions. Under the Administrator account, use the passwd command to give the root user a password and then use the root user. However, if you do not add a parameter when using useradd, you can add a common account. How to add a new system administrator account? What do I do when I use the root account: # useradd-mr *** (the name of the account you want to add) and # paddwd

By default, only the account used during installation of Ubuntu is the system administrator account and does not grant root user permissions.

Under the Administrator account, use the passwd command to give the root user a password and then use the root user.

However, if you do not add a parameter when using useradd, you can add a common account.

How do I add a new system administrator account? What do I do when I use the root account:

# Useradd-mr *** (name of the account you want to add)

Then

# Paddwd *** (new account name)

You can use useradd -- help to view the parameter description of useradd.

-M is the main directory of the account to be created. It is not created by default.

-R: Create a system administrator account

Another parameter-s was not clear at the time, and was discovered only when a problem occurred later.

When you use this method to create a user and switch to the user, you will find that the ll command is useless and the environment does not seem to be the default bash.

Yes. The default environment for creating new users in ubuntu is not bash.

You can use the useradd-D command to view the default values of new users created in ubuntu.

HOME =/home

INACTIVE =-1

EXPIRE =

SHELL =/bin/sh

SKEL =/etc/skel

CREATE_MAIL_SPOOL = no

Sure enough, the default is sh rather than CentOS's default bash.

To use bash as the default shell environment, you need:

# Useradd-s/bin/bash-mr ***

Modify the default shell environment.

Another way to change the shell environment is to modify the/etc/passwd file.

The last line of the account you created is your default shell environment.

However, it is recommended that you modify the file when creating an account. After all, file modification is prone to errors.

// ****** // Here, the root account is used to add the account. However, the system administrator can also add the system administrator account without using the root account.

// ***** // Usage: $ sudo useradd-s/bin/bash-mr. After all, root is not used without root to reduce risks.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.