System Administration Guide: Basic Administration

ProcedureHow to Modify a Command-Line Argument for an inetd Controlled Service

  1. Become superuser or assume a role that includes the Service Management rights profile.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services.

  2. List the exec property for the specific service.

    This command displays all the properties for the service identified by the FMRI. Adding the grep command restricts the output to the exec property for the service.

    # inetadm -l FMRI|grep exec
  3. Change the exec property for the service.

    The command-syntax set with the exec property defines the command string that is run when the service is started.

    # inetadm -m FMRI exec="command-syntax"
  4. Verify that the property has changed.

    List the properties again to make sure that the appropriate change has occurred.

    # inetadm -l FMRI

Example 17–13 Adding the Connection Logging (-l) Option to the ftp Command

In this example, the -l option is added to the ftp daemon when it is started. The effect of this change can be seen by reviewing the syslog output after a ftp login session has been completed.

# inetadm -l svc:/network/ftp:default | grep exec
        exec="/usr/sbin/in.ftpd -a"
# inetadm -m svc:/network/ftp:default exec="/usr/sbin/in.ftpd -a -l"
# inetadm -l svc:/network/ftp:default
         exec="/usr/sbin/in.ftpd -a -l"
# ftp localhost
Connected to localhost.
220 yellow-19 FTP server ready.
Name (localhost:root): mylogin
331 Password required for mylogin.
230 User mylogin logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221-You have transferred 0 bytes in 0 files.
221-Total traffic for this session was 236 bytes in 0 transfers.
221-Thank you for using the FTP service on yellow-19.
221 Goodbye.
# tail -2 /var/adm/messages
Jun 21 06:54:33 yellow-19 ftpd[100773]: [ID 124999] FTP LOGIN FROM localhost 
     [], mylogin
Jun 21 06:54:38 yellow-19 ftpd[100773]: [ID 528697] FTP session closed