The first step after retrieving the package is unpacking it. The package
is in the tar (tape archive) format and compressed using gzip, so first move
it to /usr/src
, then type:
# tar -xzvf shadow-mk1.tar.gz
This will unpack it into the directory: /usr/src/shadow-mk
You should take a look at the config.h
file. This file contains
definitions for some of the configuration options. If you are using the
recommended shadow-mk package, you don't actually need to change
any of the options.
By default shadowed group passwords and long (16 character) passwords are
disabled. To enable these edit the config.h
file, and change the
#undef
to #define
.
Do NOT change the setting: #undef AUTOSHADOW
The AUTOSHADOW
option was designed so that programs that were
shadow ignorant would still function. This sounds good in theory, and if
you enable this option, they will. But so will any program that calls the
getpwuid()
and getpwnam()
functions. So enabling this
option, means that a simple program will read all your encoded passwords.
Anyone who can compile programs or move a compiled program to your
system and run it will be able to 'unshadow' your shadow file.
It would also be a good idea to track down and make backup copies of the programs that the shadow suite will replace. On a Slackware system these are:
Fortunately, the shadow-mk
package has a save target in the
Makefile, so you can make backup copies of these programs by going to the
/usr/src/shadow-mk
directory and typing:
# make save
When you do this, you see error messages. The errors are because the
save target is trying to save things that you won't have on your
system yet (the programs that the Shadow Suite adds). You can safely ignore
the errors. You should now have a /usr/src/shadow-mk/save
directory
that contains the programs listed above. You may also have copies of the
original pwd.h
and shadow.h
that came with your system.
If you need to restore the original programs, you would use:
# make restore
If you run make save
after installing the suite, it will
save all the programs listed above, and all the ones that shadow installs
as well. These would be the shadow versions of the programs and of course
you would lose your originals.
Different distributions may have the locations of these system utilities
in locations that differ slightly from the locations specified in the
Makefile
. If you don't have the 7 programs listed above in the
/usr/src/shadow-mk/save
directory, then you should determine the
locations and edit the Makefile
or copy the files manually.
Run make to compile the executables in the package:
# make all