Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Administration: Basic Administration Oracle Solaris 10 1/13 Information Library |
1. Oracle Solaris Management Tools (Road Map)
2. Working With the Solaris Management Console (Tasks)
3. Working With the Oracle Java Web Console (Tasks)
4. Managing User Accounts and Groups (Overview)
5. Managing User Accounts and Groups (Tasks)
6. Managing Client-Server Support (Overview)
7. Managing Diskless Clients (Tasks)
8. Introduction to Shutting Down and Booting a System
9. Shutting Down and Booting a System (Overview)
10. Shutting Down a System (Tasks)
11. Modifying Oracle Solaris Boot Behavior (Tasks)
12. Booting an Oracle Solaris System (Tasks)
13. Managing the Oracle Solaris Boot Archives (Tasks)
14. Troubleshooting Booting an Oracle Solaris System (Tasks)
15. x86: GRUB Based Booting (Reference)
16. x86: Booting a System That Does Not Implement GRUB (Tasks)
17. Working With Oracle Configuration Manager
18. Managing Services (Overview)
How to List the Status of a Service
How to Show Which Services Are Dependent on a Service Instance
How to Show Which Services a Service Is Dependent On
Managing SMF Services (Task Map)
Using RBAC Rights Profiles With SMF
How to Disable a Service Instance
How to Enable a Service Instance
How to Restore a Service That Is in the Maintenance State
How to Revert to Another SMF Snapshot
Changing Services Offered to the Network with generic*.xml
How to Change an Environment Variable for a Service
How to Change a Property for an inetd Controlled Service
How to Modify a Command-Line Argument for an inetd Controlled Service
Using Run Control Scripts (Task Map)
How to Use a Run Control Script to Stop or Start a Legacy Service
How to Add a Run Control Script
How to Disable a Run Control Script
Troubleshooting the Service Management Facility
Debugging a Service That Is Not Starting
How to Repair a Corrupt Repository
How to Boot Without Starting Any Services
How to Force a sulogin Prompt If the system/filesystem/local:default Service Fails During Boot
20. Managing Software (Overview)
21. Managing Software With Oracle Solaris System Administration Tools (Tasks)
22. Managing Software by Using Oracle Solaris Package Commands (Tasks)
The following procedure shows how to change the configuration of a service that is not managed by the inetd service.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Many of the services have one or more configuration files that are used to define the startup or other configuration information. These files can be changed while the service is running. The contents of the files is only checked when the service is started.
# svcadm restart FMRI
Example 19-11 Sharing an NFS File System
To share a file system using the NFS service, you must define the file system in the /etc/dfs/dfstab file and then restart the NFS service. This example shows you what the dfstab file could look like, as well as how to restart the service.
# cat /etc/dfs/dfstab . . share -F nfs -o rw /export/home # svcadm restart svc:/network/nfs/server
This procedure shows how to modify cron environment variables to help with debugging.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
# svcs system/cron STATE STIME FMRI online Dec_04 svc:/system/cron:default
In this example the UMEM_DEBUG and LD_PRELOAD environment variables are set. For information about the setenv subcommand refer to the svccfg(1M) man page.
# svccfg -s system/cron:default setenv UMEM_DEBUG default # svccfg -s system/cron:default setenv LD_PRELOAD libumem.so
# svcadm refresh system/cron # svcadm restart system/cron
# pargs -e `pgrep -f /usr/sbin/cron` 100657: /usr/sbin/cron envp[0]: LOGNAME=root envp[1]: LD_PRELOAD=libumem.so envp[2]: PATH=/usr/sbin:/usr/bin envp[3]: SMF_FMRI=svc:/system/cron:default envp[4]: SMF_METHOD=/lib/svc/method/svc-cron envp[5]: SMF_RESTARTER=svc:/system/svc/restarter:default envp[6]: TZ=GB envp[7]: UMEM_DEBUG=default #
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
This command displays all of the properties for the service identified by the FMRI.
# inetadm -l FMRI
Each property for an inetd controlled service is defined by a property name and an assigned value. Supplying the property name without a specified value resets the property to the default value. Specific information about the properties for a service should be covered in the man page associated with the service.
# inetadm -m FMRI property-name=value
List the properties again to make sure that the appropriate change has occurred.
# inetadm -l FMRI
Confirm the property change that the change has the desired effect.
Example 19-12 Changing the tcp_trace Property for telnet
The following example shows how to set the tcp_trace property for telnet to true. Checking the syslog output after running a telnet command shows that the change has taken effect.
# inetadm -l svc:/network/telnet:default SCOPE NAME=VALUE name="telnet" . . default inherit_env=TRUE default tcp_trace=FALSE default tcp_wrappers=FALSE # inetadm -m svc:/network/telnet:default tcp_trace=TRUE # inetadm -l svc:/network/telnet:default SCOPE NAME=VALUE name="telnet" . . default inherit_env=TRUE tcp_trace=TRUE default tcp_wrappers=FALSE # telnet localhost Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. login: root Password: Last login: Mon Jun 21 05:55:45 on console Oracle Corporation SunOS 5.10 Generic Patch January 2005 # ^D Connection to localhost closed by foreign host. # tail -1 /var/adm/messages Jun 21 06:04:57 yellow-19 inetd[100308]: [ID 317013 daemon.notice] telnet[100625] from 127.0.0.1 32802
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
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
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 "
List the properties again to make sure that the appropriate change has occurred.
# inetadm -l FMRI
Example 19-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 SCOPE NAME=VALUE name="ftp" endpoint_type="stream" proto="tcp6" isrpc=FALSE wait=FALSE 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. Password: 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 daemon.info] FTP LOGIN FROM localhost [127.0.0.1], mylogin Jun 21 06:54:38 yellow-19 ftpd[100773]: [ID 528697 daemon.info] FTP session closed
The following procedure converts inetd.conf entries into SMF service manifests. This procedure needs to be run any time a third-party application that depends on inetd is added to a system. Also run this procedure, if you need to make configuration changes to the entry in /etc/inetd.conf.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
The inetconv command converts each entry in the selected file into service manifests.
# inetconv -i filename
Example 19-14 Converting /etc/inet/inetd.conf Entries into SMF Service Manifests
# inetconv -i /etc/inet/inetd.conf