Index of Section 1 Manual Pages
| Interix / SUA | service.1 | Interix / SUA |
service(1) service(1)
service
NAME
service - administer an Interix/Interix service
SYNOPSIS
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] ... ]
DESCRIPTION
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 [-n name] [-d displayname] [-u [domain+]user] [-p password] [-
s starttype] pathname [args...]
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.
remove name
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.)
start name
Start the service that has the specified name.
stop name
Stop (kill) the service with the specified name.
update -n name [-g group] [-d displayname] [-u [domain+]user] [-
p password] [-s starttype] [[-D dependency] ... ] [[-G groupdepend] ... ]
Update the configuration for the service with the name name. The
following options are recognized:
-D dependency
The service has (or should have) a dependency on the service
identified by dependency.
-d displayname
Set the name displayed in the service control panel to
displayname.
-G groupdepend
Name of the load order group upon which this service depends.
-g group
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.
-n name
The name of the service. This is required.
-p password
User's password.
-s starttype
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:
-d displayname
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.
-n name
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.
-p passwd
The password for the user.
-s starttype
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.
EXIT STATUS
The service(1) utility returns 0 on success and >0 on failure. It is not a
failure if the service does not start.
FILES
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.
NOTES
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.