Add administrator account in ubuntu

Source: Internet
Author: User
By default, an administrator account is added to ubuntu only when the account is installed as the system administrator account, and root user permissions are not given. Under the administrator account, use the passwd command to give the root user a password and then use the root user. However, when useradd is used, if no parameter is added, add...
By default, an administrator account is added to ubuntu only when the account is installed as the system administrator account, and root user permissions are not given. 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 at www.2cto.com? what do I do when I use the root account: # useradd-mr *** (the name of the account you want to add) then # paddwd *** (the name of the newly added account). 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 has another parameter-s for creating the system administrator account, which was not understood at the time and was discovered only when a problem occurs 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, the default value is sh rather than the default bash of CentOS. To use bash as the default shell environment, you need to: # 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, you do not need to use root/****** // Usage: $ sudo useradd-s/bin/bash-mr. After all, root is not used without root to reduce risks.

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.