Estimated build time: 3 minutes Estimated required disk space: 6 MB |
Before you install this package, you may want to have a look at the http://hints.linuxfromscratch.org/hints/shadowpasswd_plus.txt lfs hint. It discusses how you can make your system more secure regarding passwords and how to get the most out of this Shadow package.
Install the Shadow Password Suite by running the following commands:
cp src/useradd.c src/useradd.c.backup && sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' \ src/useradd.c.backup > src/useradd.c && ./configure --prefix=/usr && make && make install && cd etc && cp limits login.access /etc && sed 's%/var/spool/mail%/var/mail%' login.defs.linux > /etc/login.defs && cd /lib && mv libshadow.*a /usr/lib && ln -sf libshadow.so.0 libshadow.so && cd /usr/lib && ln -sf ../../lib/libshadow.so && cd /usr/sbin && ln -sf vipw vigr && cd /usr/share/man/man8 && ln -sf vipw.8 vigr.8 |
sed 's/\(.*\) (nflg || \(.*\))\(.*\)/\1\2\3/' src/useradd.c.backup > src/useradd.c &&: This sed is used to fix a compilation bug which occurs due to a variable (nflg) being used but not defined.
cp limits login.access /etc: These files were not installed during the installation of the package so we copy them manually as those files are used to configure authentication details on the system.
sed "s%/var/spool/mail%/var/mail%" login.defs.linux > /etc/login.defs: /var/spool/mail is the old location of the user mailboxes. The location that is used nowadays is /var/mail.
ln -sf vipw vigr and ln -sf vipw.8 vigr.8: According to the manpage of vipw, vigr should be a symlink to it. Because the shadow installation procedure doesn't create these symlinks, we create them manually.
chage, chfn, chpasswd, chsh, dpasswd, expiry, faillog, gpasswd, groupadd, groupdel, groupmod, grpck, grpconv, grpunconv, lastlog, login, logoutd, mkpasswd, newgrp, newusers, passwd, pwck, pwconv, pwunconv, sg (link to newgrp), su, useradd, userdel, usermod, vigr (link to vipw) and vipw
chage changes the number of days between password changes and the date of the last password change.
chfn changes user full name, office number, office extension, and home phone number information for a user's account.
chpasswd reads a file of user name and password pairs from standard input and uses this information to update a group of existing users.
chsh changes the user login shell.
dpasswd adds, deletes, and updates dial-up passwords for user login shells.
Checks and enforces password expiration policy.
faillog formats the contents of the failure log,/var/log/faillog, and maintains failure counts and limits.
gpasswd is used to administer the /etc/group file
The groupadd command creates a new group account using the values specified on the command line and the default values from the system.
The groupdel command modifies the system account files, deleting all entries that refer to group.
The groupmod command modifies the system account files to reflect the changes that are specified on the command line.
grpck verifies the integrity of the system authentication information.
grpunconv converts to shadow group files from normal group files.
grpunconv converts from shadow group files to normal group files.
lastlog formats and prints the contents of the last login log, /var/log/lastlog. The login-name, port, and last login time will be printed.
login is used to establish a new session with the system.
logoutd enforces the login time and port restrictions specified in /etc/porttime.
mkpasswd reads a file in the format given by the flags and converts it to the corresponding database file format.
newgrp is used to change the current group ID during a login session.
newusers reads a file of user name and clear text password pairs and uses this information to update a group of existing users or to create new users.
passwd changes passwords for user and group accounts.
pwck verifies the integrity of the system authentication information.
pwconv converts to shadow passwd files from normal passwd files.
pwunconv converts from shadow passwd files to normal files.
sg executes command as a different group ID.
Change the effective user id and group id to that of a user. This replaces the su programs that's installed from the Shellutils package.
useradd creates a new user or update default new user information.
userdel modifies the system account files, deleting all entries that refer to a specified login name.
usermod modifies the system account files to reflect the changes that are specified on the command line.
vipw and vigr will edit the files /etc/passwd and /etc/group, respectively. With the -s flag, they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow, respectively.
libshadow.[a,so]
libshadow provides common functionality for the shadow programs.
Shadow-20001016 needs the following to be installed:
autoconf: autoconf, autoheader
automake: aclocal, automake
bash: sh
binutils: ar, as, ld, nm, ranlib
diffutils: cmp
fileutils: chmod, cp, install, ln, ls, mkdir, mv, rm, rmdir
gettext: msgfmt, xgettext
gcc: cc1, collect2, cpp0, gcc
glibc: ldconfig
grep: egrep, grep
m4: m4
make: make
mawk: mawk
net-tools: hostname
sed: sed
sh-utils: basename, echo, expr, sleep, uname
texinfo: makeinfo
textutils: cat, sort, tr, uniq