This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.7.7: Win7 SSHD, chown bad file descriptor


Today I installed Cygwin 1.7.7 on Windows 7 Enterprise. OpenSSH version is OpenSSH_5.6p1, OpenSSL 0.9.8o 01 Jun 2010

With admin privileges, I set up sshd as a service using ssh-host-config, and said yes to all questions except I kept the cyg_server username.

The service started fine, then I tried to ssh to the system, entered user/pass, and was immediately disconnected. The windows application log had the following error:

sshd: PID 728: fatal: chown(/dev/tty0, 1000, 1002) failed: Bad file descriptor

$ ls -la /dev/tty0
crw------- 1 SYSTEM Administrators 136, 0 2010-11-12 14:41 /dev/tty0
(I noticed on older Cygwins on XP this is crw-rw-rw- Can I change this? Will it stay permanent on reboot? This looks like a security issue, having a tty world read/writable.)


I tried several options with the Windows service. I noticed in the ssh-host-config script that it uses ntsec, which is no longer supported. I tried using acl, noacl, ntsec, nontsec - all with no effect. Here is my latest attempt:

$ cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd.exe --desc "Cygwin Secure Shell Daemon" -a "-D" -e CYGWIN="noacl tty nodosfilewarning" -y tcpip -u cyg_server

I thought it might be a problem with the sshd privilege separation, but these look OK:

$ ls -la /var/empty
total 4
drwx------+ 1 cyg_server Administrators    0 2010-11-12 21:15 .
drwxr-xr-x+ 1 odegardj   Administrators 4096 2010-11-12 23:34 ..

$ grep ssh /etc/passwd
sshd:unused:1008:513:sshd privsep,U-PTL-1\sshd,S-1-5-21-4040343701-3909715506-17
91091093-1008:/var/empty:/bin/false


Any thoughts on what I might try next. I googled, but couldn't find anything that worked.

Thanks!

- Jeff

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]