README update.
This commit is contained in:
parent
8644ccbdc5
commit
bf732541c0
1 changed files with 30 additions and 29 deletions
59
README.md
59
README.md
|
|
@ -4,44 +4,24 @@
|
||||||
|
|
||||||
chkusr is a set of programs to verify information about a user on a UNIX based systems.
|
chkusr is a set of programs to verify information about a user on a UNIX based systems.
|
||||||
|
|
||||||
## chkgrp
|
## The idea
|
||||||
|
|
||||||
chkgrp is a set of programs to verify if a user is a member of a group on a UNIX based system. This code is so simple that it describes itself very good.
|
I needed some programs to verify some information about users and groups on a Linux/UNIX system just returning 0 on success and 1 on error.
|
||||||
|
|
||||||
More information will follow... Actually there are multiple programs with some different behavior. I will write more about this, but for now I will not.
|
|
||||||
|
|
||||||
## chkpwd
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
### The idea
|
|
||||||
|
|
||||||
I needed a program to verify passwords of users on Linux/UNIX systems using PAM that just returns 0 on success and 1 on error.
|
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
You need the PAM development package installed. On Alpine it is named linux-pam-dev, on Debian based systems it is libpam0g-dev.
|
You need the PAM development package installed. On Alpine it is named linux-pam-dev, on Debian based systems it is libpam0g-dev.
|
||||||
|
|
||||||
### Building chkpwd
|
### Building chkusr
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://git.xw3.org/hanez/chkpwd.git
|
git clone https://git.xw3.org/hanez/chkusr.git
|
||||||
cd chkpwd
|
cd chkusr
|
||||||
make
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
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 example
|
|
||||||
|
|
||||||
Set MAX_UID and MIN_UID at compile time:
|
|
||||||
|
|
||||||
```
|
|
||||||
gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpwd chkpwd.c -lpam -lpam_misc
|
|
||||||
```
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
**WARNING:** Install this software with care. chkpwd could easily be used for bruteforcing passwords from local users!
|
**WARNING:** Install this software with care. chkpwd could easily be used for bruteforcing passwords from local users!
|
||||||
|
|
@ -50,7 +30,7 @@ gcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o chkpwd chkpwd.c -lpam -lpam_misc
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
```
|
||||||
|
|
||||||
chkpwd is installed to /usr/bin/.
|
chkusr programs are installed to /usr/bin/.
|
||||||
|
|
||||||
chkpwd.h is installed to /usr/include/ for use in other applications.
|
chkpwd.h is installed to /usr/include/ for use in other applications.
|
||||||
|
|
||||||
|
|
@ -60,6 +40,28 @@ chkpwd.h is installed to /usr/include/ for use in other applications.
|
||||||
sudo make uninstall
|
sudo make uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## chkgrp
|
||||||
|
|
||||||
|
chkgrp is a program to verify if a user is a member of a group.
|
||||||
|
|
||||||
|
More information will follow... Actually there are multiple programs with some different behavior. I will write more about this, but for now I will not.
|
||||||
|
|
||||||
|
|
||||||
|
## chkpwd
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -82,11 +84,10 @@ You can also use chkpwd even without installing by just running the following co
|
||||||
|
|
||||||
#### Return codes
|
#### Return codes
|
||||||
|
|
||||||
chkpwd returns 0 on success, 1 otherwise.
|
chk returns 0 on success, 1 otherwise.
|
||||||
|
|
||||||
#### Examples
|
#### Examples
|
||||||
|
|
||||||
|
|
||||||
##### Interactive mode asking for a username and a password
|
##### Interactive mode asking for a username and a password
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -111,7 +112,7 @@ chkpwd -u hanez -p password
|
||||||
echo $?
|
echo $?
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 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)
|
||||||
- [https://www.man7.org/linux/man-pages/man8/unix_chkpwd.8.html](https://www.man7.org/linux/man-pages/man8/unix_chkpwd.8.html)
|
- [https://www.man7.org/linux/man-pages/man8/unix_chkpwd.8.html](https://www.man7.org/linux/man-pages/man8/unix_chkpwd.8.html)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue