In linux, add a root account and set the password.

Source: Internet
Author: User

Adding an account to the Intranet machine with the privilege escalation without the ECHO will make it difficult to set the password. The following is a command to add a root-level account and set the password.

Useradd-p 'openssl passwd-1-salt 'lsof'admin'-u 0-o-g root-G root-s/bin/bash-d/usr/bin/lsof lsof

 

Command to explain how useradd user-p' openssl passwd-1-salt 'lsof'admin' refers to setting the user password, and The lsof in it is similar to the key, you can write at will, admin is the plaintext password-u 0-o to add a user whose uid is 0. The-g root-G root-g to add the user to the root group-s/bin/bash specify the shell path of the new user-d/usr/bin/lsof to create the user's home directory, you can customize the user name created by lsof.

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.