salt.modules.win_shadow

Manage the shadow file

salt.modules.win_shadow.info(name)

Return information for the specified user This is just returns dummy data so that salt states can work.

参数:name (str) -- The name of the user account to show.

CLI 范例:

salt '*' shadow.info root
salt.modules.win_shadow.require_password_change(name)

Require the user to change their password the next time they log in.

参数:name -- The name of the user account to require a password change.
返回:True if successful. False if unsuccessful.
返回类型:bool
salt.modules.win_shadow.set_expire(name, expire)

Set the expiration date for a user account.

参数:
  • name -- The name of the user account to edit.
  • expire -- The date the account will expire.
返回:

True if successful. False if unsuccessful.

返回类型:

bool

salt.modules.win_shadow.set_password(name, password)

Set the password for a named user.

参数:
  • name (str) -- The name of the user account
  • password (str) -- The new password
返回:

True if successful. False if unsuccessful.

返回类型:

bool

CLI 范例:

salt '*' shadow.set_password root mysecretpassword
salt.modules.win_shadow.unlock_account(name)

Unlocks a user account.

参数:name -- The name of the user account to unlock.
返回:True if successful. False if unsuccessful.
返回类型:bool