There are a thousand ways to make it work, and
a million ways to make it not work....
I've stumbled onto one of the thousand, and
run into a few hundred of the million ;-)
It works, take my word for it.
I have two NT servers and two Win2k workstations
running cygwin with pretty much the identical
setup. sshd is running as a service via srvany.exe
on the servers and 1 wkstn; I got cygrunsrv to work
on the last install.
Post by Greg Sidelinger-----Original Message-----
Sent: Thursday, July 25, 2002 3:22 PM
Subject: RE: privsep???
you can't be using cygwin in windows. the password and group
(look at my passwd/group info below; it is extracted from
two machines that are both working as you read this. I
didn't paste the rest of my passwd/group, as they don't apply
to the sshd issue. I only included the sshd-specific info)
Post by Greg Sidelinger/etc/group
/etc/passwd
sshd:unused_by_nt/2000/xp:1133:513:sshd
privsep,U-SOLMANIA\sshd,S-1-5-21-682003330-1614895754-16069808
48-1133:/var/empty:/bin/false
notice the windows SID...
I'm finding I can't create the SSHD group and user at the same time.
You can't have a User and Group with the same name in NT. *nix
will let you.
I have a Domain user named sshd, but no Domain Group named sshd.
I'll bet if I deleted the Domain User sshd, it would still work
in cygwin. I haven't tried it yet, but I will if I get some spare
time to tinker.
Post by Greg SidelingerMaybe I'm seeing something wrong.
Notice that the sshd user entry in /etc/passwd has an
arbitrary UID - it doesn't match the SID, but is the same
as the OpenBSD UID for the sshd privsep user.
The GID is either 18 (system) or 27 (cygwin group sshd)
Post by Greg Sidelingertotal 117
drwxr-xr-x 2 Administ Administ 0 Jul 24 20:34 cron.d
-rw-r--r-- 1 Administ Administ 1271 Jul 24 20:41 group
-rw-r--r-- 1 Administ Administ 88039 Jun 21 16:28 moduli
-rw-r--r-- 1 Administ Administ 1657 Jul 24 20:55 passwd
drwxr-xr-x 2 Administ Administ 0 Jul 24 20:41 postinstall
-rw-r--r-- 1 Administ Administ 1703 Feb 12 09:46 profile
-rw-r--r-- 1 Administ Administ 386 Jul 24 20:41 profile.bak
drwxr-xr-x 2 Administ Administ 0 Jul 24 20:35 profile.d
drwxr-xr-x 2 Administ Administ 0 Jul 24 20:36 setup
-rw-r--r-- 1 Administ Administ 1049 Jul 24 20:55 ssh_config
-rw------- 1 Administ Administ 668 Jul 24 20:55
ssh_host_dsa_key
-rw-r--r-- 1 Administ Administ 612 Jul 24 20:55
ssh_host_dsa_key.pub
-rw------- 1 Administ Administ 537 Jul 24 20:55 ssh_host_key
-rw-r--r-- 1 Administ Administ 341 Jul 24 20:55
ssh_host_key.pub
-rw------- 1 Administ Administ 887 Jul 24 20:55
ssh_host_rsa_key
-rw-r--r-- 1 Administ Administ 232 Jul 24 20:55
ssh_host_rsa_key.pub
-rw-r--r-- 1 Administ Administ 2118 Jul 25 18:11 sshd_config
-rw-r--r-- 1 Administ Administ 12306 Apr 3 10:11 termcap
drwxr-xr-x 2 SYSTEM SYSTEM 0 Jul 24 20:55 empty
and it still does not work..
sshd's home dir is owned by system.system (18:18),
but you've got 513 (Everyone/nobody) as sshd's GID.
Change it to 18 or 27, and see if it works then.
Post by Greg SidelingerPost by Van Sickler, JimStephen,
sshd:*:27:18::0:0:/var/empty:/bin/false
UID 27 doesn't match the NT SID, and it doesn't have to...
GID 18 is system
ssh'ing into this PC results in:
$ ps -aelf
UID PID PPID TTY STIME COMMAND
system 429 1 0 Jul 15 /usr/sbin/sshd
system 424 429 0 17:04:04 /usr/sbin/sshd
vansickj 404 424 1 17:04:17 /usr/bin/bash
vansickj 216 404 1 17:13:05 /usr/bin/ps
ssh localhost results in two system-spawned sshd pid's
(no sshd-user/group spawned sshd pid's) as well:
$ ps -aelf
UID PID PPID TTY STIME COMMAND
system 932 1 0 10:25:52 /usr/sbin/sshd
vansickj 296 1 1 17:06:03 /usr/bin/rxvt
vansickj 1096 296 2 17:06:04 /usr/bin/bash
vansickj 1752 1096 2 17:06:09 /usr/bin/ssh
system 1860 932 0 17:06:11 /usr/sbin/sshd
vansickj 1488 1860 3 17:06:14 /usr/bin/bash
vansickj 1940 1488 3 17:06:35 /usr/bin/ps
Post by Greg SidelingerPost by Van Sickler, Jim/var/empty is 755, owned by system.system
I have no local (Win2k) user account for sshd
ssh_config
sshd_config
ssh_host_dsa_key
ssh_host_rsa_key
ssh/sshd work fine on both.
I downloaded and installed the joe editor,
http://familiehaase.de/cywgin/joe/
and use it in my cygwin shell sessions.
It's a very friendly text editor, and
works great - unlike nano, which is
unusable for files containing lines that exceed
the shell window. joe doesn't have that problem.
Jim
Post by Greg Sidelinger-----Original Message-----
Sent: Wednesday, July 24, 2002 6:36 PM
Subject: privsep???
I'm having a problem getting privsep to work properly.
. ~/fixperms.sh #from
ftp://ftp.erdelynet.com/mike/cygwin/
ssh-host-config -y
chown -R 544:544 /var
chown 18:18 /var/log/sshd.log
chown 544:544 /etc/ssh*
chown 544:544 /etc/ssh_host*_key
debug1: sshd version OpenSSH_3.4p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
Bad owner or mode for /var/empty
README.privsep
chown 544:18 /var/empty
chmod 755 /var/empty
total 0
drwxr-xr-x 2 Administ SYSTEM 0 Jul 24
20:55 empty
drwxr-xr-x 2 Administ Administ 0 Jul 24
20:55 log
drwxr-xr-x 2 Administ Administ 0 Jul 24
20:34 run
drwxr-xr-x 2 Administ Administ 0 Jul 24
20:34 tmp
debug1: sshd version OpenSSH_3.4p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
Bad owner or mode for /var/empty
UsePrivilegeSeparation option in sshd_config. I would
really like to get this going so I can play with it.
Any suggestions are welcome.
Part of the README side to do the following commands,
but I have a couple of issues with them.
# groupadd sshd
# useradd -g sshd -c 'sshd privsep' -d /var/empty -s
/bin/false sshd
1.) Cygwin does not have these commands.
2.) in Windows 2000 AD you had not have a group and a
user with the same name.
#UseLogin no
UsePrivilegeSeparation no
#Compression yes
and run sshd I get this
debug1: sshd version OpenSSH_3.4p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
Generating 768 bit RSA key.
RSA key generation complete.
everything looks good
Regards,
Stephen Nordlund
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
--
http://tech.erdelynet.com/mailman/listinfo/ssh-l/
Post by Greg SidelingerPost by Van Sickler, JimList Archives: http://archive.erdelynet.com/ssh-l/
--
List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/
List Archives: http://archive.erdelynet.com/ssh-l/
=====
Regards,
Stephen Nordlund, MCP.
Systems Engineer
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
--
List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/
List Archives: http://archive.erdelynet.com/ssh-l/
--
List Information: http://tech.erdelynet.com/mailman/listinfo/ssh-l/
List Archives: http://archive.erdelynet.com/ssh-l/