Skip to content

Commit a2bcc55

Browse files
committed
Renamed chkpw to chkpwd. (1.3.0)
1 parent 0fb2bc1 commit a2bcc55

File tree

6 files changed

+61
-61
lines changed

6 files changed

+61
-61
lines changed

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
all:
2-
$(CC) -Wall -o ./chkpw ./chkpw.c -lpam
3-
gzip -fk ./chkpw.1
2+
$(CC) -Wall -o ./chkpwd ./chkpwd.c -lpam
3+
gzip -fk ./chkpwd.1
44

55
clean:
6-
rm -f ./chkpw
7-
rm -f ./chkpw.1.gz
6+
rm -f ./chkpwd
7+
rm -f ./chkpwd.1.gz
88
rm -f ./test
99

1010
install:
11-
install -g 0 -o 0 -m 0655 ./chkpw /usr/bin/
12-
install -g 0 -o 0 -m 0644 ./chkpw.h /usr/include/
13-
install -g 0 -o 0 -m 0644 ./chkpw.1.gz /usr/share/man/man1/
11+
install -g 0 -o 0 -m 0655 ./chkpwd /usr/bin/
12+
install -g 0 -o 0 -m 0644 ./chkpwd.h /usr/include/
13+
install -g 0 -o 0 -m 0644 ./chkpwd.1.gz /usr/share/man/man1/
1414

1515
uninstall:
16-
rm -f /usr/bin/chkpw
17-
rm -f /usr/include/chkpw.h
18-
rm -f /usr/share/man/man1/chkpw.1.gz
16+
rm -f /usr/bin/chkpwd
17+
rm -f /usr/include/chkpwd.h
18+
rm -f /usr/share/man/man1/chkpwd.1.gz
1919

2020
test:
2121
$(CC) -Wall -DPAM_DEBUG -o test test.c

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# chkpw
1+
# chkpwd
22

3-
chkpw is a program that checks the validity of a users password on a UNIX/[PAM](https://en.wikipedia.org/wiki/Pluggable_Authentication_Module)-based system.
3+
chkpwd is a program that checks the validity of a users password on a UNIX/[PAM](https://en.wikipedia.org/wiki/Pluggable_Authentication_Module)-based system.
44

5-
Currently chkpw is only tested on Linux, but it should work on a [AIX](https://en.wikipedia.org/wiki/IBM_AIX), [DragonFly BSD](https://www.dragonflybsd.org/), [FreeBSD](https://www.freebsd.org/), [HP-UX](https://en.wikipedia.org/wiki/HP-UX), [Linux](https://kernel.org/), [macOS](https://en.wikipedia.org/wiki/MacOS), [NetBSD](https://netbsd.org/) and [Solaris](https://en.wikipedia.org/wiki/Oracle_Solaris) operating system too.
5+
Currently chkpwd is only tested on Linux, but it should work on a [AIX](https://en.wikipedia.org/wiki/IBM_AIX), [DragonFly BSD](https://www.dragonflybsd.org/), [FreeBSD](https://www.freebsd.org/), [HP-UX](https://en.wikipedia.org/wiki/HP-UX), [Linux](https://kernel.org/), [macOS](https://en.wikipedia.org/wiki/MacOS), [NetBSD](https://netbsd.org/) and [Solaris](https://en.wikipedia.org/wiki/Oracle_Solaris) operating system too.
66

77
## The idea
88

@@ -12,35 +12,35 @@ I needed a program to verify passwords of users on Linux/UNIX systems using PAM
1212

1313
You need the PAM development package installed. On Alpine it is named linux-pam-dev, on Debian based systems it is libpam0g-dev.
1414

15-
## Building chkpw
15+
## Building chkpwd
1616

1717
```
18-
git clone https://git.xw3.org/hanez/chkpw.git
19-
cd chkpw
18+
git clone https://git.xw3.org/hanez/chkpwd.git
19+
cd chkpwd
2020
make
2121
```
2222

23-
The code only supports verifying passwords for user id 1000 by default. Look at the file chkpw.h for some compile time options!
23+
The code only supports verifying passwords for user id 1000 by default. Look at the file chkpwd.h for some compile time options!
2424

2525
### Custom build example
2626

2727
Set MAX_UID and MIN_UID at compile time:
2828

2929
```
30-
gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpw chkpw.c -lpam -lpam_misc
30+
gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpwd chkpwd.c -lpam -lpam_misc
3131
```
3232

3333
## Installation
3434

35-
**WARNING:** Install this software with care. chkpw could easily be used for bruteforcing passwords from local users!
35+
**WARNING:** Install this software with care. chkpwd could easily be used for bruteforcing passwords from local users!
3636

3737
```
3838
sudo make install
3939
```
4040

41-
chkpw is installed to /usr/bin/.
41+
chkpwd is installed to /usr/bin/.
4242

43-
chkpw.h is installed to /usr/include/ for use in other applications.
43+
chkpwd.h is installed to /usr/include/ for use in other applications.
4444

4545
## Uninstall
4646

@@ -51,8 +51,8 @@ sudo make uninstall
5151
## Usage
5252

5353
```
54-
chkpw -h
55-
Usage: chkpw [-u <username>] [-p <password>] [-v] [-V] [-h]
54+
chkpwd -h
55+
Usage: chkpwd [-u <username>] [-p <password>] [-v] [-V] [-h]
5656
5757
Options:
5858
-u <username> Set username.
@@ -62,35 +62,35 @@ Options:
6262
-h Show this help.
6363
```
6464

65-
You can also use chkpw even without installing by just running the following command:
65+
You can also use chkpwd even without installing by just running the following command:
6666

6767
```
68-
./chkpw
68+
./chkpwd
6969
```
7070

7171
### Return codes
7272

73-
chkpw returns 0 on success, 1 otherwise.
73+
chkpwd returns 0 on success, 1 otherwise.
7474

7575
### Examples
7676

7777

7878
#### Interactive mode asking for a username and a password
7979

8080
```
81-
chkpw
81+
chkpwd
8282
```
8383

8484
#### Interactive mode only asking for a password
8585

8686
```
87-
chkpw -u hanez
87+
chkpwd -u hanez
8888
```
8989

90-
#### None interactive mode with username and password provided as arguments to chkpw
90+
#### None interactive mode with username and password provided as arguments to chkpwd
9191

9292
```
93-
chkpw -u hanez -p password
93+
chkpwd -u hanez -p password
9494
```
9595

9696
#### Request the result from the above commands
@@ -101,14 +101,14 @@ echo $?
101101

102102
## License
103103

104-
chkpw is licensed under the Apache License, Version 2.0.
104+
chkpwd is licensed under the Apache License, Version 2.0.
105105

106106
See LICENSE for details.
107107

108108
## Links
109109

110-
- [https://git.xw3.org/hanez/chkpw](https://git.xw3.org/hanez/chkpw)
111-
- [https://linux.die.net/man/8/unix_chkpwd](https://linux.die.net/man/8/unix_chkpwd)
110+
- [https://git.xw3.org/hanez/chkpwd](https://git.xw3.org/hanez/chkpwd)
111+
- [https://linux.die.net/man/8/unix_chkpwdd](https://linux.die.net/man/8/unix_chkpwd)
112112
- [https://cr.yp.to/checkpwd.html](https://cr.yp.to/checkpwd.html)
113113
- [https://pamtester.sourceforge.net/](https://pamtester.sourceforge.net/)
114114

chkpw.1

Lines changed: 0 additions & 24 deletions
This file was deleted.

chkpwd.1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.TH man 1 "01 Jun 2025" "chkpwd 1.3.0" "chkpwd man page"
2+
.SH NAME
3+
chkpwd \- checks the validity of a users password on a UNIX/PAM-based system.
4+
.SH SYNOPSIS
5+
chkpwd [OPTION]...
6+
.SH DESCRIPTION
7+
chkpwd is a program that checks the validity of a users password on a UNIX/PAM-based system.
8+
.SH OPTIONS
9+
The options which apply to the chkpwd command are:
10+
11+
-u <username> Set username.
12+
-p <password> Set password.
13+
-v Enable verbose mode.
14+
-V Print program version.
15+
-h Show this help.
16+
17+
chkpwd runs in an interactive mode when no username and/or password are set. A missing username and/or password will then be asked for program execution.
18+
19+
.SH SEE ALSO
20+
pam(3), pam_authenticate(3), PAM(8)
21+
.SH BUGS
22+
No known bugs.
23+
.SH AUTHOR
24+
Johannes Findeisen (you@hanez.org)

chkpw.c renamed to chkpwd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
2-
* chkpw is a program that checks the validity of a users password on a
2+
* chkpwd is a program that checks the validity of a users password on a
33
* UNIX/PAM-based system.
44
*
55
* Author: Johannes Findeisen <you@hanez.org> - 2024
66
* License: Apache-2.0 (see LICENSE)
77
*/
88

9-
#include "chkpw.h"
9+
#include "chkpwd.h"
1010

1111
#include <stdbool.h>
1212
#include <stdio.h>

chkpw.h renamed to chkpwd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* chkpw.h is part of chkpw, a program that checks the validity of a users
2+
* chkpwd.h is part of chkpwd, a program that checks the validity of a users
33
* password on a UNIX/PAM-based system.
44
*
55
* Author: Johannes Findeisen <you@hanez.org> - 2025
@@ -11,7 +11,7 @@
1111
#include <security/pam_misc.h>
1212
#include <stdbool.h>
1313

14-
#define VERSION "1.2.0"
14+
#define VERSION "1.3.0"
1515

1616
bool checkpw_authenticate(const char *username, const char *password,
1717
bool verbose);

0 commit comments

Comments
 (0)