Ubuntu Cobbler支持的认证方式
Cobbler作为Ubuntu系统上的自动化部署工具,其Web管理界面的认证方式主要通过/etc/cobbler/modules.conf
配置文件定义,支持以下两类核心认证机制:
该方式通过本地配置文件(/etc/cobbler/users.digest
)存储用户凭证,适用于小型环境或需要简单隔离的场景。
/etc/cobbler/modules.conf
,在[authentication]
section指定认证模块为authn_configfile
;htdigest
命令创建用户及密码(需指定领域名称,如“Cobbler”),例如:htdigest -c /etc/cobbler/users.digest "Cobbler" cbadmin
(“cbadmin”为用户名,“Cobbler”为领域);systemctl restart cobblerd
)和HTTP服务(systemctl restart httpd
)使配置生效。该方式集成Ubuntu系统的PAM(可插拔认证模块),实现与系统用户账号的统一管理,适用于需要与企业现有账号体系对接的场景。
/etc/cobbler/modules.conf
,将[authentication]
section的module
参数设置为authn_pam
;[authorization]
section的module
为authz_ownership
,通过/etc/cobbler/users.conf
文件指定允许访问的管理员用户(如[admins] webuser = ""
);useradd webuser
)并设置密码(passwd webuser
);systemctl restart cobblerd
)和HTTP服务(systemctl restart httpd
)。modules.conf
中[authentication]
section仅保留一种模块(如优先使用authn_pam
);/etc/cobbler/users.digest
(配置文件认证)或/etc/cobbler/users.conf
(PAM认证)的文件权限为600
,防止未授权访问;