]> git.ipfire.org Git - thirdparty/util-linux.git/blame - login-utils/passwd.c
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / login-utils / passwd.c
CommitLineData
fd6b7a7f
KZ
1/*
2 * passwd.c - change password on an account
3 *
6dbe3af9
KZ
4 * Initially written for Linux by Peter Orbaek <poe@daimi.aau.dk>
5 * Currently maintained at ftp://ftp.daimi.aau.dk/pub/linux/poe/
5c36a0eb
KZ
6 *
7 * Hacked by Alvaro Martinez Echevarria, alvaro@enano.etsit.upm.es,
8 * to allow peaceful coexistence with yp. Nov 94.
9 *
10 * Hacked to allow root to set passwd from command line.
11 * by Arpad Magossanyi (mag@tas.vein.hu)
6dbe3af9
KZ
12 */
13
fd6b7a7f
KZ
14/*
15 * Sun Oct 15 13:18:34 1995 Martin Schulze <joey@finlandia.infodrom.north.de>
16 *
2b6fc908 17 * I have completely rewritten the whole argument handling (what?)
fd6b7a7f 18 * to support two things. First I wanted "passwd $user $pw" to
2b6fc908
KZ
19
20 (a very bad idea; command lines are visible to people doing ps
21 or running a background job that just collects all command lines)
22
fd6b7a7f 23 * work and second I wanted simplicity checks to be done for
5c36a0eb 24 * root, too. Only root can turn this off using the -f
fd6b7a7f
KZ
25 * switch. Okay, I started with this to support -V version
26 * information, but one thing comes to the next. *sigh*
27 * In a later step perhaps we'll be able to support shadow
28 * passwords. (?)
29 *
30 * I have also included a DEBUG mode (-DDEBUG) to test the
31 * argument handling _without_ any write attempt to
32 * /etc/passwd.
33 *
34 * If you're paranoid about security on your system, you may want
35 * to add -DLOGALL to CFLAGS. This will turn on additional syslog
36 * logging of every password change. (user changes are logged as
37 * auth.notice, but changing root's password is logged as
38 * auth.warning. (Of course, the password itself is not logged.)
39 */
6dbe3af9 40
7eda085c
KZ
41