This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:microsoft:cygwin:start [2018/02/24 13:49] rk4n3 |
tech:microsoft:cygwin:start [2018/02/24 16:39] (current) rk4n3 |
||
---|---|---|---|
Line 5: | Line 5: | ||
===== Removal ===== | ===== Removal ===== | ||
* Uninstall all services | * Uninstall all services | ||
+ | * List services installed: ''cygrunsrv -L'' \\ // **NOTE:** the ''inetd'' service won't show in the list, even if installed/running, but stopping it and removing it will work regardless // | ||
+ | * Stop each service with: ''cygrunsrv --stop service_name'' | ||
+ | * Remove each service with: ''cygrunsrv --remove service_name'' | ||
* Stop X server, after stopping any cygwin X clients that are running | * Stop X server, after stopping any cygwin X clients that are running | ||
* If using the ''cyglsa'' authentication mechanisms (hopefully not - pain), revert all of that | * If using the ''cyglsa'' authentication mechanisms (hopefully not - pain), revert all of that | ||
Line 12: | Line 15: | ||
* Using the ''regedit'' program, remove the registry tree(s) ''Software\Cygwin'' under ''HKEY_LOCAL_MACHINE'' and/or ''HKEY_CURRENT_USER'' | * Using the ''regedit'' program, remove the registry tree(s) ''Software\Cygwin'' under ''HKEY_LOCAL_MACHINE'' and/or ''HKEY_CURRENT_USER'' | ||
+ | |||
+ | ------ | ||
====== Backup Client-Side Agent ====== | ====== Backup Client-Side Agent ====== | ||
Cygwin makes a particularly powerful solution for a client-side agent in providing central command-n-control with a centralized backup/archival system. Here are some details around how Albert Lea Data has devised such a solution. | Cygwin makes a particularly powerful solution for a client-side agent in providing central command-n-control with a centralized backup/archival system. Here are some details around how Albert Lea Data has devised such a solution. | ||
===== Installation ===== | ===== Installation ===== | ||
- | * Create an administrative user for the backup system identity to be used, log in as that user | + | * Create an administrative user (we'll refer to as ''$USR'') for the backup system identity to be used, log into Windows as that user |
- | * Acquire the ZIP archive to the client machine | + | * Acquire the ZIP archive to the client machine: [[http://www.albertleadata.org/pub/backup-client-agent.zip]] |
* Extract the contents of the ZIP archive to a working location | * Extract the contents of the ZIP archive to a working location | ||
- | * Move the ''cygwin64'' folder extracted from the ZIP archive to suitable destination (''d:\\'' recommended) | + | * Move the ''cygwin64'' folder extracted from the ZIP archive to suitable destination, we'll refer to as ''$CYGDIR'' // (either ''c:\'' or ''d:\'' recommended) // |
* Edit the ''.reg'' files extracted from the ZIP archive to ensure path references are corrected | * Edit the ''.reg'' files extracted from the ZIP archive to ensure path references are corrected | ||
- | * Right-click on each ''.reg'' file and | + | * Right-click on each ''.reg'' file and choose ''Merge'' |
+ | * Right-click on the ''Cygwin.bat'' batch file in the ''$CYGDIR'' folder and choose ''Run as administrator'' | ||
+ | * Run these commands:<code>mkpasswd -l > /etc/passwd | ||
+ | mkgroup -l > /etc/group | ||
+ | chmod 111 /var | ||
+ | chmod +t /var | ||
+ | ssh-host-config | ||
+ | </code> // Make sure to enter ''ntsec'' for CYGWIN value, and specify your new admin user when prompted // | ||
+ | * Start the SSH service: ''cygsrvrun -S sshd'' | ||
+ | * SSH to the Windows box and log in as new admin user | ||
+ | * Create SSH key with: ''ssh-keygen -t rsa'' // ... make sure to specify empty passphrase // | ||
+ | * Populate ''authorized_keys'' file with server's SSH key for password-less operation | ||
+ | * Populate backup server's host key // (typically just SSH to it and answer ''yes'' at key prompt) // | ||
+ | * Ensure home directory has group-write disabled, for example: ''chmod g-w ~'' | ||
- | ===== Packaging & Ugrading ===== | + | ===== Packaging & Upgrading ===== |
This is the recipe for how the client-side agent footprint is bundled, and how to go about upgrading it. | This is the recipe for how the client-side agent footprint is bundled, and how to go about upgrading it. | ||