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