salt.modules.solaris_shadow

Manage the password database on Solaris systems

salt.modules.solaris_shadow.default_hash()

Returns the default hash used for unset passwords

CLI 范例:

salt '*' shadow.default_hash
salt.modules.solaris_shadow.info(name)

Return information for the specified user

CLI 范例:

salt '*' shadow.info root
salt.modules.solaris_shadow.set_maxdays(name, maxdays)

Set the maximum number of days during which a password is valid. See man passwd.

CLI 范例:

salt '*' shadow.set_maxdays username 90
salt.modules.solaris_shadow.set_mindays(name, mindays)

Set the minimum number of days between password changes. See man passwd.

CLI 范例:

salt '*' shadow.set_mindays username 7
salt.modules.solaris_shadow.set_password(name, password)

Set the password for a named user. The password must be a properly defined hash, the password hash can be generated with this command: openssl passwd -1 <plaintext password>

CLI 范例:

salt '*' shadow.set_password root $1$UYCIxa628.9qXjpQCjM4a..
salt.modules.solaris_shadow.set_warndays(name, warndays)

Set the number of days of warning before a password change is required. See man passwd.

CLI 范例:

salt '*' shadow.set_warndays username 7