Subject: SSHD
From: [email-masked] (JJ Streicher-Bremer)

16 Dec 1998 23:44:33 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="------------EE5DD47AAEBC16A027149CE7"
To: [email-masked], Cygnus Mailing List <[email-masked]>

This is a multi-part message in MIME format.
--------------EE5DD47AAEBC16A027149CE7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Here is the install batch file I use to install sshd on my systems along
with the appropriate reg files.  Read the readme.txt file as well.  

Let me know if there are any questions about this information.

JJ

[email-masked] wrote:
> 
> I had a question for ya about sshd under b20.  I have been trying to get it
> to start under inetd but have been
> unsuccessful so far.  I tried creating a new user called daemon, gave it
> the appropriate privs, (run as OS, etc)
> and inetd starts ok, just no sshd...any ideas ??
> 
> Thanks!
> Dan Wittenberg
> 
> Received: from moon.uiowa.edu ([128.255.1.36]) by marker.its.uiowa.edu
>       (Lotus SMTP MTA v4.6.1  (569.2 2-6-1998)) with SMTP id
>       862566DC.004CF32D; Wed, 16 Dec 1998 08:01:30 -0600
>       Received: (from daemon@localhost)
>           by moon.uiowa.edu (8.9.1/8.9.1/its-moon-2.1) id IAA27222
>           for dan.wittenberg/[email-masked]; Wed, 16 Dec
>       1998 08:03:26 -0600
>       Received: from cygnus.com (runyon.cygnus.com [205.180.230.5])
>           by moon.uiowa.edu (8.9.1/8.9.1/its-moon-2.1) with ESMTP id
>       IAA06716
>           for <[email-masked]>; Wed, 16 Dec 1998 08:03:25
>       -0600
>       Received: (from majordom@localhost)
>           by runyon.cygnus.com (8.8.7-cygnus/8.8.7) id KAA15128;
>           Tue, 15 Dec 1998 10:07:14 -0800 (PST)
>       Received: from guinness.digisle.net (guinness.digisle.net
>       [167.216.152.33])
>           by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id KAA15123
>           for <[email-masked]>; Tue, 15 Dec 1998 10:07:12 -0800 (PST)
> 
>       Received: from digisle.net (di-sf-dhcp-15.digisle.com
>       [167.216.154.65])
>           by guinness.digisle.net (8.8.7/8.8.7/digisle) with ESMTP id
>       IAA26065
>           for <[email-masked]>; Tue, 15 Dec 1998 08:07:10 -1000 (HST)
> 
>       Message-ID: <[email-masked]>
>       Date: Tue, 15 Dec 1998 10:07:09 -0800
>       X-PH: [email-masked]
>       From: JJ Streicher-Bremer <[email-masked]>
>       X-Mailer: Mozilla 4.5 [en] (WinNT; I)
>       X-Accept-Language: en
>       MIME-Version: 1.0
>       To: [email-masked]
>       Subject: /dev in B20.1
>       References: <[email-masked]>
>       Content-Type: text/plain; charset=us-ascii
>       Content-Transfer-Encoding: 7bit
>       Sender: [email-masked]
>       Precedence: bulk
> 
> From:     JJ Streicher-Bremer <[email-masked]>
> When:       12/15/98 12:07:09 PM
> 
> To:   [email-masked]
> cc:    (bcc: Dan Wittenberg/UNV_IOWA)
> Subject:  /dev in B20.1
> 
> I just downloaded and installed the user tools version 20.1.  What a
> wonderful difference.  sshd runs better than ever before (faster more
> stable)!  Now I have a question about the /dev folder.  The user tools
> don't create it, yet there are quite a few messages about things in the
> /dev folder.  How do I go about creating these special files?  The main
> reason for this is to get syslogd working.
> 
> I have appended a cygcheck of my system.
> 
> Any help would be greatly appreciated.
> 
> Thanks in advance
> JJ Streicher-Bremer
> NT Systems Administrator
> Digital Island Inc.
> 
> ---------------------------------------------------------------------------
> --
> Cygnus Win95/NT Configuration Diagnostics
> Current System Time: Tue Dec 15 10:05:14 1998
> 
> WinNT Ver 4.0 build 1381 Service Pack 4
> 
> Path:   .
>         /usr/bin
>         /usr/local/bin
>         .
>         //d/apps/perl/bin
>         //d/apps/4nt
>         //d/apps/ntreskit
>         //d/apps/ntsec
>         //c/winnt/system32
>         //c/winnt
> 
> SysDir: C:\WINNT\System32
> WinDir: C:\WINNT
> 
> CYGWIN32 = `tty'
> CYGWIN = `tty binmode title strip_title glob'
> HOME = `/home/jj'
> PWD = `/dev'
> USER = `jj'
> 
> Use `-r' to scan registry
> 
> a:\ fd           N/A    N/A
> c:\ hd  FAT     1019Mb  65% CP    UN
> d:\ hd  NTFS    3726Mb  78% CP CS UN PA FC
> e:\ net NTFS    6149Mb  28% CP CS UN PA FC
> z:\ cd  CDFS     557Mb 100%    CS UN
> 
> D:\apps\Unix  /         native  text=binary
> \\.\a:        /dev/fd0  native  text!=binary
> \\.\b:        /dev/fd1  native  text!=binary
> \\.\tape0:    /dev/st0  native  text!=binary
> \\.\tape1:    /dev/st1  native  text!=binary
> D:\users      /home     native  text=binary
> 
> Found: D:\apps\Unix\usr\bin\bash.exe
> Found: D:\apps\Unix\usr\bin\cat.exe
> Not Found: cpp (good!)
> Found: D:\apps\Unix\usr\bin\find.exe
> Not Found: gcc
> Not Found: gdb
> Not Found: ld
> Found: D:\apps\Unix\usr\bin\ls.exe
> Not Found: make
> Found: D:\apps\Unix\usr\bin\sh.exe
> 
>   446k 1998/12/15 D:\apps\Unix\usr\bin\cygwin1.dll
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".
--------------EE5DD47AAEBC16A027149CE7
Content-Type: application/x-unknown-content-type-regfile;
 name="mounts.reg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="mounts.reg"

--------------EE5DD47AAEBC16A027149CE7
Content-Type: application/x-unknown-content-type-regfile;
 name="sshd.reg"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="sshd.reg"

UkVHRURJVDQNCg0KW0hLRVlfTE9DQUxfTUFDSElORVxTWVNURU1cQ3VycmVudENvbnRyb2xT
ZXRcU2VydmljZXNcc3NoZFxQYXJhbWV0ZXJzXQ0KIkFwcGxpY2F0aW9uIj0iZDpcXGFwcHNc
XHVuaXhcXHVzclxcbG9jYWxcXHNiaW5cXHNzaGRyYy5iYXQiDQoNCg==
--------------EE5DD47AAEBC16A027149CE7
Content-Type: application/x-unknown-content-type-TextPad.bat;
 name="setup.bat"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="setup.bat"

--------------EE5DD47AAEBC16A027149CE7
Content-Type: text/plain; charset=us-ascii;
 name="readme.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="readme.txt"

Installation of sshd on Windows NT

The installation files expect to have the unix subsystem installed in d:\apps\unix.  If you wish to have the system installed in a different path you MUST edit the path in the following files:

setup.bat
sshd.reg
mounts.reg
/usr/local/sbin/sshdrc.bat (edit this file after you un-tgz the file)

To setup sshd:
1)copy all install files to d:\apps\unix (create this folder if necessarry)
2)untar unix.tgz (tar -zxvf unix.tgz)
3)run setup.bat
4)a reboot may be necessary to get the service authentication correct :-)

NOTES:
a)The service is set to autostart.
b)Initially only the administrator configured for ssh access.
c)The setup.bat file creates a local user, sshd, with an initial password.  This password can be changed by changing the user password and modifying the sshd service's startup configuration.  The sshd user is granted the following four special rights:

SeTcbPrivilege - Act as part of the operating system
SeIncreaseQuotaPrivilege - Increase quotas
SeServiceLogonRight - Logon as a service
SeAssignPrimaryTokenPrivilege - Replace a process level token

To set up a user for sshd access
1)add the user to /etc/passwd (use the command mkpasswd to do this easily)
	(example: mkpasswd -d |grep -i username >>/etc/passwd )
2)restart sshd. (kill -1 SSHDPID - the pid of the current sshd process is stored in /var/run/sshd.pid)

NOTES:
a)The folder /home is mounted to d:\users.  You can add a users folder here, put the information in the passwd file, and use .profile, .bash_login, and .bashrc to modify the users environment.
b)The shell is a GNU bash shell, as such the backspace char ( \ )is the escape char and the asterisk ( * ) is a shell wildcard.  To use a backspace or an asterisk in a command line (i.e. net use * \\server\share ) you must use double backslashes ( \\ ) and quote the asterisk ( '*' ).  A command line would become 

net use '*' \\\\server\\share

c)The shell accesses the drives via the WinNT POSIX subsystem.  Other drives are accesed via a double forward slash.  ( //c/winnt )

d)The shell uses UNIX style file format.  This means that if you edit a text file with a regular text editor it will put a ^M at the end of every line.  This will royally mess up the system.

e)The sshd authenticates users in this order:
	Checks to see if the user is in /etc/passwd
	Checks the local system for a matching user ID
	If the system is a member of a domain it checks the doamin for a matching ID

----------------------------------------------------------------------------
example .profile file

# ~/.profile --
#   The  personal  initialization  file,  executed  for login shells
#[ -e /etc/D ] && echo "~$USER/.profile" 1>&2

if [ -n "$BASH_VERSION" ]; then
  if [ -r "$HOME/.bashrc" ]; then
    # login shells are always interactive, are they?
    . $HOME/.bashrc
  fi
else
  # non-bash 'sh'-users are on their own for now...
  :
fi
TERM=ansi
export TERM
PATH=.:$PATH://d/apps/ntreskit://c/winnt/system32://c/winnt
export PATH
--------------EE5DD47AAEBC16A027149CE7--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".