# Password and account expiry

Accounts and passwords can be given an end. An account that expires stops working on a date; a password that expires must be replaced by the user. Both are on the [Restrictions](Users-Restrictions.md) tab of a user in the User Manager.

## Account Expiration

| Setting | What it does |
|---|---|
| **Account Expires** | the date and time after which the user cannot log in, as `MM/dd/yyyy hh:mm am/pm`. Empty: never. **Quick Set** fills in a date some days from now. |
| **Auto delete the account also** | the account is deleted when it expires, instead of only being refused |
| **Execute CrushTask when account expires** | a job to run at that moment: to archive the user's files, or to tell somebody |
| **Extend expiration if used every x days** | each login moves the end that many days into the future. An account that is used stays; one that is forgotten runs out by itself. |
| **How many days in advance to notify user of account expiration?** | how long before the end the user is told. 10 on a new server. |
| **Execute CrushTask to notify about account expiration** | the job that does the telling, usually a mail |

The lists of jobs are empty until jobs exist: the cards say where to make them.

**Auto delete** removes the account, not the files the account could reach. To remove those too, do it in the job that runs at expiry.

## Password Expiration

| Setting | What it does |
|---|---|
| **Expire Password.** | turns it on for this user |
| **Days** | after how many days a password must be replaced. 30 is filled in. |
| **Expire now** | makes the password expire at once: the user must choose a new one at the next login |
| **Password will expire on** | the date that follows from the last change |
| **How many days in advance to notify user of password expiration?** | 10 on a new server |
| **Execute CrushTask to notify about password expiration** | the job that tells the user |

A user whose password has expired is asked for a new one when they log in to the web interface. A client that cannot ask, such as an SFTP client, is refused until the password was changed there.

## Minimum Password Age

**Minimum age for password**, in hours: how long a password must be kept before the user may change it again. 0: no wait. It keeps a user from running through the password history in a minute to get back to the old password.

The rules for what a new password must look like, and how many old ones are remembered, are on the [Admin](Users-Admin.md#password-rules) tab.

## Good practice

- Set password expiry on `default`, or on the template of the people it shall hold for, and take service accounts out of it with **Override**: a script cannot type a new password.
- Give every account that is made for a project or a guest an expiry date when you make it.
- Use **Extend expiration if used every x days** for partners: it cleans up the ones that stopped coming.
