service grant [domain+]user
service help [subcommand]
service install [-n name] [-d displayname] [-u [domain+]user]
[-p password] [-s starttype]pathname [args...]
service list [-a]
service remove name
service revoke [domain+]user
service start service
service stop service
service update -n name[-g group] [-d displayname]
[-u [domain+]user] [-p password] [-s starttype]
[[-D dependency] ... ] [[-G groupdepend] ... ]
The service(1) utility installs and administers Interix
programs being run as Windows services. You need Administrator
privileges to run service(1) with any subcommands other than
help or list.
Each service has a name, which is unique on the system. The name
is the base name of the command path name, or it can be specified
when the service is installed by using the -n option.
For more information, and for guidelines on how to write a
Interix service program, see Interix Overview in Windows Services
for UNIX Help.
The service(1) utility includes the following
subcommands:
grant [domain+]user
Grant the service-logon privilege to the specified user.
Specify domain if the domain that user belongs to is
not the same as domain of the user running the command. A user must
possess the service-logon privilege if a service is be run as that
user; otherwise, the service will not start. Note that the
install subcommand grants this privilege automatically if
the -u option is specified.
Install the program specified by pathname as a service,
with the specified arguments args. The pathname must
be the absolute path name of a Interix executable residing on a
local file system. If the program is on a network drive, the
install will fail. (The Windows service controller runs under a
privileged account that does not have access to networked file
systems.) The install options are explained later in this
topic.
list [-a]
List installed Interix services. If the -a option is
specified, both Win32 and Interix services will be listed.
removename
Remove the specified service.
revoke [domain+]user
Revoke the service-logon privilege of the specified
user. Specify domain if the domain that user
belongs to is not the same as domain of the user running the
command. (If a user name and password are supplied to the install
subcommand, the user will be granted the service-logon privilege.
The remove subcommand does not revoke this privilege,
however.)
Update the configuration for the service with the name
name. The following options are recognized:
-Ddependency
The service has (or should have) a dependency on the service
identified by dependency.
-ddisplayname
Set the name displayed in the service control panel to
displayname.
-Ggroupdepend
Name of the load order group upon which this service
depends.
-ggroup
The load order group to which this service belongs. By default,
all services load at the same time, which can cause contention for
resources that slows boots. By assigning some services to a
different load order group, the system startup can be made more
orderly.
-nname
The name of the service. This is required.
-ppassword
User's password.
-sstarttype
Set the service's start type to be either auto (start up
automatically at boot time) or manual. Because there should
be no Interix processes running when you install an update of
Interix, it is useful to reset the service startup types to manual
first, and then reboot.
-u [domain+]user
The name of the user running the service. Specify domain
if the domain that user belongs to is not the same as domain
of the user running the command.
When installing a service, the following options are
recognized:
-ddisplayname
Display the name displayname in Services in the
Administrative Tools folder within Control Panel. The display name
defaults to the name specified by the -n option.
-nname
Give the service the specified name. The name defaults
to the base name of the service program's path name. Each installed
service must have a unique name.
-ppasswd
The password for the user.
-sstarttype
Start the service as the specified starttype, which is
one of auto (start the service at boot time) or
manual (start only on request).
-u [domain+]user
Run service with the permissions of user. Specify
domain if the domain that user belongs to is not the
same as domain of the user running the command. If a user is
specified, a password must also be supplied. If no user is
specified, the service runs as the built-in user LocalSystem, and
no password is required.
The service(1) command makes use of the following
files:
$SYSTEMROOT/system32/psxrun.exe
The Win32 program that mediates between the Interix and Win32
service mechanisms. SYSTEMROOT is the installed directory for
Windows, typically C:\WINNT.
As mentioned above, services do not have access to networked
file systems. Services cannot automatically mount drives. A user
logged in through a service (such as telnetd(1)), has access
to any drives mounted by the current user sitting at the physical
console, using their mappings (subject to the usual permissions).
Because these mappings change from user to user, it is best not to
rely on the existence of any networked drives.
It is also best not to try to mount the drive while logged in
through telnet(1), for example, because this makes the drive
unavailable to users at the physical console and has unpleasant
interactions with the Win32 login program. Do not use
NET.EXE from a telnet(1) session.