Update cheatsheets

This commit is contained in:
ivuorinen
2025-03-26 00:18:43 +00:00
parent d27ceafd82
commit 5871f35fe8
91 changed files with 438 additions and 37 deletions

View File

@@ -10,20 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- List password information for the user:
`chage --list {{username}}`
`chage {{[-l|--list]]} {{username}}`
- Enable password expiration in 10 days:
`sudo chage --maxdays {{10}} {{username}}`
`sudo chage {{[-M|--maxdays]}} {{10}} {{username}}`
- Disable password expiration:
`sudo chage --maxdays {{-1}} {{username}}`
`sudo chage {{[-M|--maxdays]}} {{-1}} {{username}}`
- Set account expiration date:
`sudo chage --expiredate {{YYYY-MM-DD}} {{username}}`
`sudo chage {{[-E|--expiredate]}} {{YYYY-MM-DD}} {{username}}`
- Force user to change password on next log in:
`sudo chage --lastday {{0}} {{username}}`
`sudo chage {{[-d|--lastday]}} {{0}} {{username}}`
- Re-enable an account:
`sudo chage {{[-E|--expiredate]}} -1 {{username}}`