Configurar un cliente NTP (Network Time Protocol) en Solaris

Para configurar un cliente NTP (Network Time Protocol) en Solaris 10. Lo primero que hay que hace es crear el archivo /etc/inet/ntp.conf indicando la ip del servidor NTP, para que sincronicen contra el servidor de la hora.

vi /etc/inet/ntp.conf
#Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident  "@(#)ntp4.client        1.1     09/06/25 SMI"
#
# If you want to configure your client to listen for multicast, uncommnet
# this line. This should only be used for casual time keeping, like keeping
# a desktop system in sync.

#multicastclient 224.0.1.1

# To configure NTP servers, replace the server_name with either the IP addre
ss
# or hostname of the server you wish to use. If you just want to keep the ti
me
# in a causual way, one server may be enough for you. If you wish to keep it
# to a more accurate level, 3 or more is recommended. Do not choose 2, becau
se
# 2 servers is an unstable configuration. By the same token 3 is only accept
able
# if all are always available, since when a single one reboots or otherwise
# becomes unavailable, you have just 2.
#
# For a list of Internet NTP servers see
# http://support.ntp.org/bin/view/Servers/WebHome
# If you use this list, be sure to read, understand and abide by the rules
# each server has published for accessing themselves.
#
# There is also a DNS round-robin pool of public access NTP servers. The
# instructions for accessing these are at http://www.pool.ntp.org
# Please consider adding your own servers to the pool if possible.
#
# Many ISP's also provide NTP servers for use by their customers.

#server <IP> iburst
server <IP>

# Always configure the drift file. It can take days for ntpd to completely
# stabilize and without the drift file, it has to start over on a reboot
# of if ntpd restarts.

driftfile /var/ntp/ntp.drift

# It is always wise to configure at least the loopstats and peerstats files.

# Otherwise when ntpd does something you don't expect there is no way to
# find out why.

statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable

# To track the events regarding the system clock, the protostats file can be
 useful
# as well.
#filegen protostats file protostats type day enable

# To see the current state of the crypto authentication protocols, enable th
e
# cryptostats file.
#filegen cryptostats file cryptostats type day enable

# The clockstats files are only useful if a hardware reference clock is
# configured. See the /etc/inet/ntp.server file for more information about
# that.
#filegen clockstats file clockstats type day enable

# The sysstats and rawstats output might be useful in debugging.
#filegen sysstats file sysstats type day enable
#filegen rawstats file rawstats type day enable

# The timingstats file is probably not useful at all. It is designed for
# perfomance debugging by the developers of NTP.
#filegen timingstats file timingstats type day enable

# There are several types on authentication supported by NTP. The easiest
# to use is a set of passwords, called "keys". They should be stored
# the /etc/inet/ntp.keys file. Each key in the ntp.keys file can be
# assigned to certain types of trust levels. See ntpd(1m) for more
# information on setting up key.

#keys /etc/inet/ntp.keys
#trustedkey 1
#requestkey 1
#controlkey 1

#
# To configure leap seconds processing, download the latest NIST leap seconds
# file to /etc/inet, and then create a symbolic link to it from the ntp.leap
# file. Without this file, NTP will still be able to accept leap announcements
# from its upstream sources. If this file exists and is less than 6 months old
# then the contents of this file will take precedence over the upstream servers.
# The latest leap seconds file is always available at ftp://time.nist.gov/pub

#leapfile /etc/inet/ntp.leap

Después hay que habilitar y reiniciar el servicio con svcs/svcadm. Y finalmente verificamos:

Solaris 10
svcs | grep ntp
 offline*        svc:/network/ntp:default
svcadm enable svc:/network/ntp
 svcadm refresh svc:/network/ntp
 svcadm restart svc:/network/ntp
svcs | grep ntp
 nline         2003     svc:/network/ntp:default

Solaris 9
/usr/lib/inet/xntpd

Comprobación de que se ha realizado correctamente:
ntpq -p