为便于管理,可以配置票证更新和有关票证授予票证 (Ticket Granting Ticket, TGT) 失效的警告消息。管理员可以设置针对所有用户的警告,而用户可以定制自己的警告。有关更多信息,请参见 warn.conf(4) 和 ktkt_warnd(1M) 手册页。
本示例显示了为 TGT 配置更新和消息系统的多种方法。
# pfedit /etc/krb5/warn.conf ## ## renew the TGT 30 minutes before expiration and send message to users terminal ## mre@EXAMPLE.COM renew:log terminal 30m ## ## send a warning message to a specific email address 20 minutes before TGT expiration ## mre@EXAMPLE.COM mail 20m mre@example2.com ## # renew the TGT 20 minutes before expiration and send an email message on failure ## bricker@EXAMPLE.COM renew:log-failure mail 20m - ## ## catch-all: any principal not matched above will get an email warning * mail 20m -
配置消息后,在新客户机上运行 kclient 命令。
client# /usr/sbin/kclient -p /net/denver.example.com/export/install/kcprofile
在现有客户机上启用该服务。
# svcadm enable network/security/ktkt_warn示例 4-9 为用户配置 TGT 失效消息
每个用户都可以配置单独的 warnd 配置文件,该配置文件名为 /var/user/$USER/krb-warn.conf。存在此文件是为了防止读取管理员文件。
% pfedit /var/user/mre/krb-warn.conf mre@EXAMPLE.COM renew:log mail 25m &
TGT 会于失效的 25 分钟之前更新,系统会记录更新操作,并且会在当时向 Kerberos 用户 mre 发送邮件。