h61436 s 00003/00003/00466 d D 1.17 00/06/10 16:15:08 clyde 17 16 c Change gzip to gunzip e s 00001/00001/00468 d D 1.16 98/09/14 13:16:54 clyde 16 15 c Change pathname for dist package e s 00005/00005/00464 d D 1.15 98/07/20 15:52:41 clyde 15 14 c Spell check e s 00017/00000/00452 d D 1.14 98/07/20 15:16:09 clyde 14 13 c Mention what the package builds e s 00000/00017/00452 d D 1.13 98/07/20 14:39:25 clyde 13 12 c Remove passwd history group stuff e s 00018/00001/00451 d D 1.12 98/07/16 14:51:18 clyde 12 11 c Add part about history database group query e s 00009/00003/00443 d D 1.11 98/07/16 09:12:34 clyde 11 10 c 1. Update path tokens c 2. Add note about multiple visits to dirs during build e s 00003/00003/00443 d D 1.10 98/07/09 15:27:44 clyde 10 9 c Fix link typo e s 00177/00187/00269 d D 1.9 98/07/08 17:01:59 clyde 9 8 c Edit cleanup e s 00002/00290/00454 d D 1.8 98/07/02 15:02:22 clyde 8 7 c Remove Internals section e s 00540/00115/00204 d D 1.7 98/07/02 14:09:27 clyde 7 6 c Major revision e s 00035/00003/00284 d D 1.6 98/06/30 12:22:04 clyde 6 5 c Add part on test suite and bug fixes e s 00002/00002/00285 d D 1.5 98/06/30 10:32:45 clyde 5 4 c Change title e s 00008/00009/00279 d D 1.4 98/06/26 09:56:13 clyde 4 3 c Fix signatures e s 00002/00002/00286 d D 1.3 98/06/25 16:32:28 clyde 3 2 c Change name to Programmers Guide e s 00056/00084/00232 d D 1.2 98/06/25 16:01:57 clyde 2 1 c Move installed files table to admin guide e s 00316/00000/00000 d D 1.1 98/06/24 17:22:02 clyde 1 0 c date and time created 98/06/24 17:22:02 by clyde e u U f e 0 t T I 1
D 2D 9 To build and install npasswd, the following are needed:
D 9
I 14
The npasswd package produces the following components which share infrastructure and code:
E 14
D 10 The full list and description of files in the distribution is in the package MANIFEST. E 10 I 10 The full list and description of files in the distribution is in @NPASSWD-SRC@/MANIFEST. E 10
D 9
E 9
Special files in the distribution |
||
Files in the distribution |
||
Configure | D 9Script which probes system facilities and performs package setup.
Produces config.sh and expands all .SH files in the distribution. See About Configure. |
E 9
I 9
Script which probes system facilities and performs package setup. Produces config.sh and expands all .SH files in the distribution. See About Configure. |
E 9
config.sh | D 9Shell script which contains settings from Configure. | E 9 I 9Shell script which contains settings from Configure. | E 9
config.h | D 9 E 9C include which contains settings from config.sh. | |
config_h.SH | D 9 E 9Shell script which creates config.h. | |
Makefile.SH | D 9 E 9Shell script which creates Makefile with settings from config.sh | |
*.SH | Shell script which produces a file with settings from config.sh | |
Directories in the distribution |
||
Directories in the distribution |
||
developer | Files needed for developers. This directory is a part of the developers kit. |
|
dict | Dictionary sources, which are a seperate distribution. | |
doc | Documentation (text, manual pages, HTML) | |
hints | Platform-specific hints for use by Configure. | |
files | Configuration, help and messages files. | |
src | Top-level sources. | |
src/Common | Common object library sources. | |
src/Methods | Password database method module source. | |
src/Methods/TestSuite | Test suite for passwd database method modules. | |
src/Scripts | Utility script sources. | |
src/PasswordCheck | Password check library source. | |
src/PasswordCheck/cracklib | Crack library. | |
src/PasswordCheck/cracklib/tools | Crack library testing and dictionary tools. |
D 9
D 9 Configure is a shell script which probes the system environment to determine how to build npasswd. Configure itself is built using the Metaconfig software configuration package. E 9 I 9 Configure is a shell script which probes the system environment to determine how to build npasswd. E 9 D 9
Configure will determine what kind of system it is running on, features E 9 I 9
It will determine what kind of system it is running on, features E 9 D 15 available and idiosyncrasies of the C compilation environment. E 15 I 15 available and idiosyncrasies of the C compiliation environment. E 15 D 9
The result of Configure is config.sh, which contains shell variable settings which will be incorporated into other files. Every file ending with ".SH" is a script which, when run, produce a source file with settings from config.sh. E 9 I 9
The result of running Configure is config.sh, which contains shell variable settings which will be incorporated into other files. Every file ending with ".SH" is a script which, when run, produce a source file with settings from config.sh. E 9 D 9
If you are doing porting or development work on npasswd, refrain from making changes to Configure. Fetch the developer kit and modify the Metaconfig units from which Configure is built. It is a lot easier to integrate changes to Metaconfig units rather than determine which unit E 9 I 9
Configure itself is built using the metaconfig software configuration package. If you do porting or development work on npasswd, fetch the developer kit and modify the metaconfig units from which Configure is built. It is a lot easier to integrate changes to metaconfig units rather than determine which unit E 9 a particular Configure change affects. D 9
E 9
Configure options of interest: E 9 I 9 | Useful options to Configure: E 9 | ||
---|---|---|---|
-d | D 9 E 9Use defaults for all answers. | ||
-e | D 9 E 9Go without questioning to building config.sh. | ||
-h | D 9 E 9Print help message and exit. | ||
-S | D 9 E 9Expand all .SH files. |
E 9
E 9 D 9
For most of the questions you are asked by Configure, taking the default is sufficient. Some of the questions require your attention, especially the first time Configure is run.
Do you expect to run these scripts and binaries on multiple machines? [n] D 9
Pathname where the private library files will reside?
### Found passwd files "/etc/passwd"
Change passwd file list? [n]
### Found shadow files "/etc/shadow"
Change shadow file list? [n]
Replace system programs? [y]
D 9 Do you wish to build the test version? [y]
E 9 Activate the "paranoid" option [n]
Password history file [/usr/lib/passwd/history] D 9
Primary dictionary directory [/usr/lib/passwd/dictionaries]
I 12 D 13 Group for history database [nobody]
E 13 E 12
D 9
D 9 If the system has symbolic links, it a good idea to use a "build tree" to keep the source area clean. Such a tree can be constructed with the BuildTree script. E 9 I 9 If your system has symbolic links, it is a good idea to use a "build tree" to keep the source area clean. The BuildTree script will do this. E 9
build-area is where you want to build npasswd
source-area is the directory where you unpacked the distribution.
mkdir build-area
cd build-area
D 9
sh source-area/bin/MakeTree source-area
E 9
I 9
sh source-area/bin/BuildTree source-area
E 9
E 11 I 11
During build process some directories will be visited multiple times. D 15 This is because of the dependancies between various parts of E 15 I 15 This is because of the dependencies between various parts of E 15 the package.
E 11
Common make targets |
|||
help | D 9See what package targets are available. | See what package targets are available. | E 9|
---|---|---|---|
all | D 9Build the default stuff, whatever that may be. Most all targets do make all in various subdirectories. | Build the default stuff, whatever that may be. Most all targets do make all in subdirectories. | E 9|
depend | D 9Update the C source dependancies. A modified Makefile is created E 9 I 9 D 15 | Update the C source dependancies. A modified Makefile is created E 9 which has the dependancy information at the end. E 15 I 15 | Update the C source dependencies. A modified Makefile is created which has the dependency information at the end. E 15 D 9 Most depend targets do make depend in various subdirectories. |
install | D 9Install what is built in this directory. Most install targets do make install in various subdirectories. | E 9 I 9Install what is built in this directory. Most install targets do make install in subdirectories. | E 9|
deinstall | D 9Remove what is built in this directory. Most deinstall targets do make deinstall in various subdirectories. | Remove what is built in this directory. Most deinstall targets do make deinstall in subdirectories. | E 9|
clean | D 9Light debris removal. | Light debris removal. | E 9|
realclean | D 9Total cleanup of debris, object files and executables. | Total cleanup of debris, object files and executables. | E 9|
Special make targetsE 9 I 9 |
Special make targetsThese targets alter the compile and load flags in Makefile.local, which is included by the Makefile. They also do recursive makes in subdirectories.(See the Support Guide for details) E 9 |
||
debug-none | Create production binary (default). The -XD command line option is still available for run-time debugging. | E 9 I 9debug-none | Build production executables. The -XD command line option is available for run-time debugging. | E 9
debug-dbx | Build binary with symbol table for source debugger. | E 9 I 9debug-dbx | Build production executables with source debugger support. | E 9
debug-files | Build debugger binary and enable use of files in current directory.
Used to test update code without changing system files. |
E 9
I 9
debug-files | Build debug-dbx executables which change files in the current directory. | E 9
debug-system | Build debugger binary, enable use of files in current directory and
disable some update and security checks.
This binary is insecure and partly non-functional and NOT suitable for production. |
E 9
I 9
debug-system | Build debug-system executables with many security and update checks
disabled.
These executables are insecure, partly non-functional and are NOT suitable for production. |
E 9
D 9
D 9
Most customizations should be done by re-running Configure.
However, there are some some changes which requires modification
of options.h in the top-level source directory. The file
to edit is options_h.SH.
E 9
I 9
Customizing
E 9
I 9 Major customizations can be done by running Configure. Some changes require modification of options.h. The file to edit is options_h.SH.
E 9 Follow this procedure: D 9
edit options_h.SH # Change the source sh options_h.SH # Reconstruct the file make realclean # Remove objects and executables make # Rebuild with new options D 9E 9 I 9 E 9
D 9 Do make install in the top build directory. E 9 I 9 Invoke make install in the top-level build directory. E 9
To reinstall the vendor password programs, D 9 run npasswd-lib/restorefiles. E 9 I 9 D 11 run @NPASSWD-LIB@/restorefiles. E 11 I 11 run @NPASSWD-UTIL@/restorefiles. E 11 E 9
To reinstall the vendor programs and delete npasswd, do D 9
E 9 I 9
E 9 make deinstall D 9E 9 I 9 E 9 in the top build directory. If the replace vendor programs option was not enabled, the system utilities are not affected by the removal process.
The procedure to build, install and setup npasswd:
D 16 gzip --stdout npasswd-dist.gz | tar xpfv - # Unpack npasswd E 16 I 16 D 17 gzip --stdout npasswd-2.XX.tar.gz | tar xpfv - # Unpack npasswd E 17 I 17 gunzip --stdout npasswd-2.XX.tar.gz | tar xpfv - # Unpack npasswd E 17 E 16 cd dict D 17 gzip --stdout npasswd-words.gz | tar xpfv - # Unpack word lists E 17 I 17 gunzip --stdout npasswd-words.gz | tar xpfv - # Unpack word lists E 17 cd .. Configure # Answer the questions make # Build everything make install # Install everything D 9 npasswd-lib/history_admin load < /dev/null # Make history database E 9 I 9 D 11 @NPASSWD-LIB@/history_admin load < /dev/null # Make history database E 11 I 11 @NPASSWD-UTIL@/history_admin load < /dev/null # Make history database E 11 E 9D 8
Tactics for troublshooting:
make realclean make debug-dbx make
This approach requires familarity with C and a source debugger.
This approach requires familarity with C and a source debugger. The developer kit can be useful.
make realclean make debug-files make cp /etc/passwd etc_passwd cp /etc/shadow etc_shadow; chown my-name etc_shadow # # To test the NIS map direct updating # mkdir -p yp/domain-name # Make test NIS map area cp /var/yp/domain-name/passwd.* yp/domain-name
If you find a bug, send the report to npasswd-bugs@lists.cc.utexas.edu. Please use the bug report template BugReport.html.
The more information you can provide in the bug report, the better chance of getting a fix. The developer has a limited variety of UNIX platforms available for devlopment and testing.
Support will be done on a time-available basis.
If you fix a bug, sent the change to npasswd-bugs@lists.cc.utexas.edu.
The preferred form is a context diff between the distribution and the modified sources (e.g. diff -c dist-src new-src).
Do not make changes directly to files which are generated from .SH files. The next time that Configure is run, those changes will be lost. Modify (and submit changes to) the .SH file instead.
Changes to the Configure script are more complicated. It is built from many files (see below), so changes should be made to those sources. If you need to make serious modifications to Configure, obtain the developer kit, modify the metaconfig units and submit those changes. Minor changes can be reported by a context diff on Configure.
E 7 D 2
E 2 This is a quick overview of the internals of npasswd. It is not a full documentation of the entrails, but is a supplement to the ultimate documentation - the source code. D 2 E 2
D 2
User layer | User interface
& Configuration sub-system |
||
---|---|---|---|
Password check library |
|
|
|
|
|||
Method layer |
|
|
|
|
|
|
|
Utility layer |
|
E 7 I 7
E 7
D 7 Guiding philosophies for the design: E 7 I 7
E 7
D 7 The full list and description of the distribution is in the package MANIFEST file.
developer | Files needed for developers. D 2 This directory is included only in the developer distribution. E 2 I 2 This directory is included only in the developers kit. E 2 |
dict | Dictionary word lists. The word lists are in a seperate distribution. |
doc | Documentation files. |
hints | Platform hints for use by Configure. |
files | Ancillary sources, |
src | Npasswd sources. |
src/Common | Common object library sources. |
src/Methods | Password database method module source. |
src/Methods/TestSuite | Test suite for passwd database method modules. |
src/Scripts | Utility script sources. |
src/PasswordCheck | Password check library source. |
src/PasswordCheck/cracklib | Crack library. |
src/PasswordCheck/cracklib/tools | Crack library testing and dictionary tools. |
D 7 Test suites are provided for various parts of npasswd. These C programs and shell script drivers are throughout the distribution in directories and scripts named TestSuite. If changes are made to any part of npasswd which has a test suite, that suite should be run to verify that the changes didn't break the basic functionality. If new functionality is added, then the test suite should be modified to verify it.
Bug fixes and changes should be sent to the address noted in the support section of the manual.
The preferred form is a context diff between the distribution and the modified sources (e.g. diff -c dist-src new-src).
Do not make changes directly to files which are generated from .SH files. The next time that Configure is run, those changes will be lost. Modify the .SH file instead.
Changes to the Configure script are more complicated. It is built from many sources (see below for a quick overview), so changes should be made to those sources. If you need to make serious modifications to Configure, obtain the developer kit, modify the metaconfig units and submit those changes. Minor changes can be reported in the usual way.
E 7 E 6 D 2
D 2 The following files and directories are used by npasswd. These paths (except the configuration file) can be changed by directives in the configuration file. E 2 I 2 The npasswd kit is built using the dist package - a set of tools meant to ease the construction and maintenance of portable software. E 2
D 2
Default location | E 2 I 2 The central component of which is the Configure script generator, metaconfig. This program scans source files, feature files (units), and builds a Configure script. Configure probes the system, requests information from the user, and saves the results for use in customizing the package.What it is |
---|---|
/usr/lib/passwd | Directory where all the parts live |
/usr/lib/passwd/xbin | Directory where vendor utilities are saved |
/usr/lib/passwd/dictionaries | Directory where the hashed Crack dictionaries live |
/usr/lib/passwd/doc | Directory for npasswd documentation |
/usr/lib/passwd/passwd.conf | The npasswd configuration file |
/usr/lib/passwd/chfn.help
/usr/lib/passwd/chfn.motd |
Help and message-of-the-day for chfn sub-program |
/usr/lib/passwd/chsh.help
/usr/lib/passwd/chsh.motd |
Help and message-of-the-day for chsh sub-program |
/usr/lib/passwd/passwd.help
/usr/lib/passwd/passwd.motd |
Help and message-of-the-day for passwd sub-program |
/usr/lib/passwd/history | Password history database |
E 4
Document id %Z% %M% %I%
Version %I%
Last modified %G%
D 4 Clyde Hoover E 4 I 4 D 9 Clyde Hoover