TOP Operating Systems

Packages

cygcheck

$ cygcheck -s -v -r > cygcheck.out
$ cygcheck.exe -c openssh # package status
install
cygrunsrv
openssh
configuration
$ ssh-host-config
$ vi /etc/sshd_config
firewall
ssh 22
start stop
$ cygrunsrv -S sshd # start
$ cygrunsrv -E sshd # stop
$ cygrunsrv -Q sshd # status
$ cygrunsrv -R sshd # remove( -S できなくなる)
debug
ssh -vv vaio-x
Loginプロンプトが出ない
vi /etc/sshd_conf
s/^#UseDNS yes/UseDNS no/


---

memo

installed packages

/etc/setup

environment variable

Start->MyComputer->Property->(System Property)->DetailSetting TAB->Environment Variables->System Environment Variables->New/Edit
CYGWIN 環境変数
CYGWIN=tty ntsec nosmbntsec
ntsecuse NT security model
nosmbntsecno nsec on samba
glob(default) wildcard expansion
ttyenable tty support
binmode(default)
cygwin-terminal
Option-Text-Locale: ja_JP Charset: UTF-8
.bashrc
cmd /c chcp 65001

passwd/group

  • The /etc/passwd and group files are no longer generated by default, starting with Cygwin 1.7.34
see POSIX accounts, permission, and security
see mkpasswd to create
$ mkpasswd -l > /etc/passwd
$ mkgroup  -l > /etc/group
$ chmod +r /etc/passwd
$ chmod +r /etc/group

Error

MS-DOS style path detected

cygwin warning:
MS-DOS style path detected: \Program Files\Microsoft SDKs\Windows\v6.0\VC\Bin/
ls
Preferred POSIX equivalent is: /cygdrive/c/Program Files/Microsoft SDKs/Window
s/v6.0/VC/Bin/ls
CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-p...のフラグを立てる

ping: socket: Operation not permitted

cygwin版のpingがインストールされてしまったみたい。コンソールを管理者で起動すればOK。
SUIDのフラグを立てるが効果ないので、cygwinのpingをアンインストール
$ which ping
/usr/bin/ping
$ ls -l /usr/bin/ping
-rwxr-xr-x 1 smnb なし 13824 May  4  2014 /usr/bin/ping
$ chmod u+s !$
chmod u+s /usr/bin/ping
$ ls -l /usr/bin/ping
-rwsr-xr-x 1 smnb なし 13824 May  4  2014 /usr/bin/ping
$ ping 192.168.1.1
ping: socket: Operation not permitted
$ alias ping='$SYSTEMROOT/system32/ping'
$ ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
:



at

  • no at command on cygwin.
$ which at
/cygdrive/c/WINDOWS/system32/at

schtasks.exe ??

crontab

crontab -e
00 19 * * * /path/to/bash/script
package
cron-4.1-60 - cron: Vixie's cron. (installed binaries and support files)
cygrunsrv??

プロシージャエントリポイントCancelSynchronousIoがダイナミックリンクライブラリKERNEL32.dllから見つかりませんでした。

Minimum supported client : Windows Vista [desktop apps only]
https://msdn.microsoft.com/en-us/library/windows/d...

管理人/副管理人のみ編集できます