Cygwin using 1-root User login

Source: Internet
Author: User

Set the root user login in Cygwin

To simulate a Linux environment in Windows, you can install Cygwin. After the Cygwin is installed, the system defaults to the login name of your Windows user name as Cygwin. Permissions are still ordinary users, to see whether the real root, just to see the command prompt is not "#", the average user is "$". , $ represents a normal user.

Workaround:

    • Locate the Cygwin installation directory and have a file named passwd in the ETC folder

    • administrator:unused:500:513:u-shucb\administrator,s-1-5-21-699659893-4255586547-1715211970-500:/home/the file in the Administrator:/bin/bash. Change to the following form:

      Root:unused:0:0:u-shucb\root,s-1-5-21-699659893-4255586547-1715211970-500:/home/root:/bin/bash

    • In the home folder, you can see the Administrator folder and create a new root folder

    • Run Cygwin again, #表示已经是root权限用户.

Open passwd This file with notepad++, find the following section and change the Windows user name to root (a total of 3).

Replace administrator to root, this is just renaming, the real key part is the red number part, that is the permission control, the 500 and 513 are changed to 0, so as to get the real root permissions.

Delete Cygwin under W7

Cygwin uninstall in the problem: No permissions to delete the folder, prompting "need administrator rights", "Need Administrator Permissions" Even if you have logged in as Administrator, still cannot delete. According to the method on the Internet, run "takeown/f */R" under DOS, the owner of the change file cannot be deleted, the installation of the Cygwin is not installed or not, finally refer to the Windows Help file "Manage permission Project".

The key is to add the Everyone group to the folder's permission items, and give Full Control permission.

The steps are as follows:

1, right-click to delete the Cygwin folder, select Properties----security----------the owner----editor, change the owner to your login account, tick the "replace the owner of child containers and objects" below.

2. Select the Permissions tab in the Advanced dialog box, security, properties, click Change Permissions, click Add, enter everyone, click OK to add the Everyone account, in the Pop-up dialog box will be fully controlled after the Allow check, OK.

3, in the properties, security, Advanced Security Settings dialog box, check the "Use inheritable permissions from this object to replace all child object Permissions", then you can delete the Cygwin folder successfully.

Cygwin using 1-root User login

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.