mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-17 23:00:51 +00:00
Update cheatsheets
This commit is contained in:
@@ -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}}`
|
||||
|
||||
Reference in New Issue
Block a user