.TH DOS 1
.SH NAME
dos \- command line access to Microsoft Windows™ servers
.SH SYNOPSIS
.B dos
[
.B -h
.I host
] [
.B -u
.I user
] [
.B -k
.I keypattern
] [
.B -c
.I cmd args ...
]
.SH DESCRIPTION
.I Dos
connects to a Windows host and starts a session to
.I cmd.exe
on
.IR host ,
or the machine named in the
.B $dos
environment variable if there is no
.B -h
option.
.LP
The user name and authentication domain 
is usually picked up from factotum(4), the entry is selected
based on the default domain of the remote host.
An alternative userid may be specified with
.BR -u .
Userids have the form
.B user@authdom
where
.I authdom
is the windows authentication domain.
.PP
If a
.B -c
is present, the remainder of the command line is executed by
.I rc
on the server, and then
.I dos
exits.
.LP
The remote shell's initial working directory is set to the
current directory when
.I dos
was envoked, translated by mappings defined by the
.IR dosmap (6)
configuration files.
.I Rio's
/dev/wdir is kept in sync with directory changes on
the remote server providing (where possible) the correct
context for the plumber.
.LP
On connection the users Roving Profile and user
specific environment are loaded,
vestigial network mounts left over from the GUI environment are
deleted and replaced with shares defined in the configuration files.
.SH FILES
c:\\listen\\listen.exe
.br
c:\\listen\\tcp9999.exe
.br
c:\\listen\\dosmap
.br
$home/lib/dosmap/<serverdomain>
.SH SOURCE
.B /sys/src/cmd/dos.c
.br
.B /sys/src/cmd/win32/dosd.c
.br
.B /sys/src/cmd/win32/listen/*
.SH SEE ALSO
.I dosmap (6)
.SH BUGS
Interrupts are neither caught nor passed to the remote host.
.LP
The remote shell's standard input, output and error
are attached to the
.I dos
commands file descriptors rather /dev/cons.
.LP
There should be no need to duplicate the dosmap file on both
local and remote hosts.
.LP
The network link is not encrypted, thus all usernames and passwords
are vunerable to sniffing.
.LP
Detection of the current directory (parsing the windows prompt) is
horrific.
.LP
The
.I Dos
client should be replaced by
.IR cpu (1),
with an additional  
.BR tlspass
authentication mechnism.
.I Dosd.exe
should be replaced by
.I cpud.exe
a 9p client which opens /mnt/term/dev/cons for
console I/O, /mnt/term/dev/cpunote for interrupts, /mnt/term/dev/wdir
to keep the plan9 working directory synchronised with windows directory
changes, and /mnt/term/usr/$user/lib/dosmap to discover shared drive mappings.
