def set_maxdays(name, maxdays):
    '''
    Set the maximum number of days during which a password is valid. See man
    passwd.

    CLI Example:

    .. code-block:: bash

        salt '*' shadow.set_maxdays username 90
    '''
    pre_info = info(name)
    if maxdays == pre_info['max']:
        return True
    cmd = 'passwd -x {0} {1}'.format(maxdays, name)
    __salt__['cmd.run'](cmd, python_shell=False)
    post_info = info(name)
    if post_info['max'] != pre_info['max']:
        return post_info['max'] == maxdays
def set_maxdays ( name , maxdays ) : pre_info = info ( name ) if maxdays == pre_info [ 'max' ] : return True cmd = 'passwd -x {0} {1}' . format ( maxdays , name ) __salt__ [ 'cmd.run' ] ( cmd , python_shell = False ) post_info = info ( name ) if post_info [ 'max' ] != pre_info [ 'max' ] : return post_info [ 'max' ] == maxdays
Set the maximum number of days during which a password is valid. See man
    passwd.

    CLI Example:

    .. code-block:: bash

        salt '*' shadow.set_maxdays username 90