README update.

This commit is contained in:
Johannes Findeisen 2025-06-27 01:32:23 +02:00
commit 45973a3a90

View file

@ -11,7 +11,6 @@ chkusr is a set of programs to verify information about a user on a UNIX based s
* [Uninstall](#uninstall) * [Uninstall](#uninstall)
* [chkgrp](#chkgrp) * [chkgrp](#chkgrp)
* [chkpwd](#chkpwd) * [chkpwd](#chkpwd)
* [Custom build](#custom-build)
* [Usage](#usage) * [Usage](#usage)
* [Return codes](#return-codes) * [Return codes](#return-codes)
* [Examples](#examples) * [Examples](#examples)
@ -19,6 +18,7 @@ chkusr is a set of programs to verify information about a user on a UNIX based s
* [Interactive mode only asking for a password](#interactive-mode-only-asking-for-a-password) * [Interactive mode only asking for a password](#interactive-mode-only-asking-for-a-password)
* [None interactive mode with username and password provided as arguments to chkpwd](#none-interactive-mode-with-username-and-password-provided-as-arguments-to-chkpwd) * [None interactive mode with username and password provided as arguments to chkpwd](#none-interactive-mode-with-username-and-password-provided-as-arguments-to-chkpwd)
* [Request the result from the above commands](#request-the-result-from-the-above-commands) * [Request the result from the above commands](#request-the-result-from-the-above-commands)
* [Custom build](#custom-build)
* [Links](#links) * [Links](#links)
* [License](#license) * [License](#license)
@ -74,13 +74,7 @@ chkpwd is a program that checks the validity of a users password on a UNIX/[PAM]
The code only supports verifying passwords for user id 1000 by default. Look at the file chkpwd.h for some compile time options! The code only supports verifying passwords for user id 1000 by default. Look at the file chkpwd.h for some compile time options!
#### Custom build
Set MAX_UID and MIN_UID at compile time:
```
gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpwd chkpwd.c -lpam -lpam_misc
```
### Usage ### Usage
@ -102,6 +96,8 @@ You can also use chkpwd even without installing by just running the following co
./chkpwd ./chkpwd
``` ```
#### Return codes #### Return codes
chk returns 0 on success, 1 otherwise. chk returns 0 on success, 1 otherwise.
@ -132,6 +128,14 @@ chkpwd -u hanez -p password
echo $? echo $?
``` ```
#### Custom build
Set MAX_UID and MIN_UID at compile time:
```
gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpwd chkpwd.c -lpam -lpam_misc
```
## Links ## Links
- [https://git.xw3.org/hanez/chkpwd](https://git.xw3.org/hanez/chkpwd) - [https://git.xw3.org/hanez/chkpwd](https://git.xw3.org/hanez/chkpwd)