Win PC HowTo
Clone this wiki locally
Things you need to know before use Cygwin on Win-PC
Every win-pc user is setup as standard user, Only Administrator has the privilege to modify Cygwin. If A user installs package from cygwin, it will conflict Windows security issues, and sshd will possibly break. Basically, this is due to the architecture of cygwin will have mixed privileges from different users.
Every User are only suppose to modify things under its home account. If anyone need to install package, just ask Administrator to do it from Admin account locally through cygwin setup. This is the only way of how cygwin work under vista so far(unless you know other better ones).
Although we have backup from check point and external hard disks, the volumn of disk label will change. This will cause a mismatch inside vista system(RPC service), which has been confirmed by Microsoft. Consequently, Cygwin can not read and write user privileges correctly. In additin, after you have recovered from a hard disk image, all previous check points and disk images will be gone.
The best solution to deal with a cygwin error caused by windows vista is to re-install everything from scratch. External hard disk is used to back-up users' files.
How to install Open SSH on Windows PC from scratch
Re-install vista from installation DVD. Create all users, including buildslave, with pre-assigned passwd. When you were asked for updates installation, choose "ask me later". Also remember to disable all updates.
IP: 18.104.22.168, subnet mask: 255.255.255.0, gateway: 22.214.171.124, DNS: 126.96.36.199, 188.8.131.52
Under network center, you need to setup network as private network, and make it discoverable.
Configuration on Win-vista:
First, activate Administrator account from cmd.exe with run as Administrator: net user Administrator /active:yes
Second, Right click My Computer -> Properties -> Advanced -> Environment Variables: Click "New" button under "System Variables", add a new entry to System Variables: variable name is 'CYGWIN', variable value is 'ntsec tty'. Then, select 'Path' variable, Click "Edit" button, append ';c:\cygwin\bin' to the end of the existing varaible string.
Third, Click Start -> Control Panel -> Security Centre -> Manage Security Settings for Windows Firewall -> Exceptions tab -> Add Port -> "Name of port" is openssh, "Port number" is 22 (check the "TCP" checkbox).
Configuration for XCygwin:
First, Install cygwin base packages from Administrator, in addition with the following packages: tcp_wrappers, zlib, openssh.
Second, exexcute the following command from Admin account:
editrights.exe -a SeAssignPrimaryTokenPrivilege -u Administrator editrights.exe -a SeCreateTokenPrivilege -u Administrator editrights.exe -a SeTcbPrivilege -u Administrator editrights.exe -a SeServiceLogonRight -u Administrator
If you have the following output after executing "editrights.exe -l -u Administrator", then you are doing correctly:
SeAssignPrimaryTokenPrivilege SeCreateTokenPrivilege SeTcbPrivilege SeServiceLogonRight
Third, run ssh-host-config (don't force the -y option) manually answer "YES" to all questions. If the scripts says "This script plans to sue cyg_server, Do you want to use a different name? Answer no. After this, it will create new privileged user account 'cyg_server' with the passwd you assigned.
Finally, run 'cyglsa-config' from Admin account. This will register the cygwin LSA authentication package. Then, reboot.
Add a new user:
Always add new user as standard user. Then login, run cygwin shell (don't do this from administrator) with command 'ssh-user-config, answer no to all the questions, unless you want to use ssh-keys.
How to solve the fatal error of unable to remap dll
The remap error is caused by the way how windows manage its dll files: Windows uses ASLR (address space layout randomization) to manage its dll files, which load dll files into different area of memory every time system is rebooted. Cygwin setup program can change the record keeping, This happens especially for python and perl script package were installed.
You need to do the following from Admin account to solve the error: 1. Close all Cygwin processes. 2. Right click My Computer -> Properties -> Advanced -> Environment Variables: Click "Edit" under "User Variables for Administrator", Change "TEMP" and "TMP" from "%USERPROFILE%\AppData\Local\Temp" to "c:\cygwin\tmp". 3. Open a windows command prompt "cmd.exe". # cd c:\cygwin\bin # ash # /usr/bin/rebaseall 4. Reverse step 2.