Use Cygwin for root user rights under Windows platform

Source: Internet
Author: User

Recently, when I was using Cygwin, I found a problem when I wanted to use root user rights, I couldn't create root mega. Finally, after searching the internet, Gion found a way to change the root limit of the user's rights before, as follows:

Actual environment: Win10 Install Cygwin to operate

Actual problem: Need to get root permission

Solution:

1. Find/etc/passwd, if yes, skip step 3 (need to directly in the folder, the command line has permission problems can not be changed)

2. If none, create one. Mkpasswd-l >/etc/passwd

3. If available, locate the current user in the open text. Place the prefix at unused and change the two digits to 0.

4. Re-open the command to see the command line prefix changed to # ($ for a normal user), indicating that administrator rights have been obtained.

PS: It should be remembered to have a copy of the original or generated passwd file on the side, in order to change the exit root limit.

PSS: Use git clone under root to not copy the items in your private repository.

Use Cygwin for root user rights under Windows platform

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.