系统管理指南:安全性服务

Procedure如何安装第三方的口令加密模块

第三方口令加密算法通常在软件包中作为模块提供。运行 pkgadd 命令时,供应商的脚本应修改 /etc/security/crypt.conf 文件。然后,您可修改 /etc/security/policy.conf 文件以包含新模块及其标识符。

  1. 使用 pkgadd 命令添加软件。

    有关如何添加软件的详细说明,请参见《系统管理指南:基本管理》中的“添加或删除软件包 (pkgadd)”

  2. 确认是否已添加新模块及模块标识符。

    读取 /etc/security/crypt.conf 文件中的加密算法列表。

    例如,以下行说明已安装了用于实现 crypt_rot13 算法的模块:


    # crypt.conf
    
    #
    
    md5 /usr/lib/security/$ISA/crypt_md5.so
    
    rot13 /usr/lib/security/$ISA/crypt_rot13.so
    
    
    
    # For *BSD - Linux compatibility
    
    # 1 is MD5,  2a is Blowfish
    
    1 /usr/lib/security/$ISA/crypt_bsdmd5.so
    
    2a /usr/lib/security/$ISA/crypt_bsdbf.so
  3. 将新安装算法的标识符添加到 /etc/security/policy.conf 文件。

    以下行显示了需要修改以添加 rot13 标识符的 policy.conf 文件的摘录:


    # Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
    
    # ...
    
    #ident  "@(#)policy.conf        1.6     02/06/07 SMI"
    
    # ...
    
    # crypt(3c) Algorithms Configuration
    
    CRYPT_ALGORITHMS_ALLOW=1,2a,md5,rot13
    
    #CRYPT_ALGORITHMS_DEPRECATE=__unix__
    
    CRYPT_DEFAULT=md5

    在此示例中,如果当前口令是使用 crypt_rot13 算法加密的,则使用 rot13 算法。新用户口令使用 crypt_sunmd5 算法进行加密。此算法配置适用于仅 Solaris 网络。