之前有写过一篇 Zabbix 透过 SNMPv3 监控 Lenovo XClarity Controller,但后来发现每过一阵子监控就会取不到资料,最后发现原来是使用者的密码预设为 90 天到期所导致。
今天就来教大家如何关闭 XClarity Controller 密码到期原则
BMC Configuration > Network
查看 XClarity Controller 是否开启 SSH 服务
XClarity Controller CLI
我们就可以使用 Putty,透过 SSH 登入 XClarity Controller。
login as: USERIDKeyboard-interactive authentication prompts from server:Password:End of keyboard-interactive prompts from serversystem> users Account Login ID Advanced Attribute Access Password Expires ------- -------- ------------------ ------ ---------------- 1 USERID Native Read/Write 91 day(s)
查看 accseccfg 指令的参数
system> accseccfg -husage: accseccfg [options]options: -am User authentication method (local, ldap, localldap, ldaplocal) -lp Lockout period after maximum login failures in minutes (between 0 and 2880, 0=lockout period does not expire) -pe Password expiration time period (between 0 and 365, 0=never expire) -pew Password expiration warning time period (between 0 and -pe value, 0=never warn) -pc Password complexity rules enabled (on,off) -pl Password length (If password complexity rules enabled, the password length is between 8 and 32. Otherwise, it is between 0 and 32) -ci minimum change interval in hours (between 0 and 240, 0=change immediately.) -lf maximum number of login failures before account is locked (between 0 and 10, 0=never locked) -chgdft (on|off) user must change default password after first login -chgnew (on|off) new user must change password after first login -rc Password reuse cycle (between 0 and 10, 0=reuse immediately) -wt Web inactivity session timeout in minutes.(between 0 and 1440)
使用 accseccfg -pe 让密码永不过期
system> accseccfg -pe 0[CLI]: -pe value need be set larger than current -pew value.Or XCC will not get a password expiration warning message.
提示错误:-pe value 的值不得大于 -pew
使用 accseccfg -pew 关闭密码到期警示讯息,再输入一次指令就可以了。
system> accseccfg -pew 0oksystem> accseccfg -pe 0ok
BMC Configuration > User / LDAP
可以看到使用者的密码已被设定为永不过期。
之后 Zabbix 就不会因为使用者密码到期,造成 SNMPv3 取不到资料的窘境了。
参考文件
1.https://datacentersupport.lenovo.com/us/en/products/servers/thinksystem/sr530/solutions/ht504809-how-to-reset-xcc-password-expiration-date-for-userid-lenovo-thinksystem
2. https://insidesystems.com/guides/how-to-upgrade-lenovo-thinksystem-xclarity-controller-from-standard-to-advanced/