Password expiration is deprecated, and will be eventually removed.
The functionality of expiry(1) is the most superfluous of password
expiry and can be removed early. This shouldn't conflict with any
existing regulations about password expiry.
Link: <https://github.com/shadow-maint/shadow/pull/1432>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
chgpasswd.8.xml \
chpasswd.8.xml \
chsh.1.xml \
- expiry.1.xml \
faillog.5.xml \
faillog.8.xml \
getsubids.1.xml \
mandir = @mandir@/cs
man_MANS = \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man1/gpasswd.1 \
+++ /dev/null
-.TH "EXPIRY" "1" "11/05/2005" "User Commands" "User Commands"
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.SH "JMÉNO"
-expiry \- zkontroluje a vynutí politiku vypršení platnosti hesla
-.SH "POUŽITÍ"
-.HP 7
-\fBexpiry\fR [\-c] [\-f]
-.SH "POPIS"
-.PP
-\fBexpiry\fR
-zkontroluje (\fB\-c\fR) vypršení platnosti aktuálního hesla a případně vynutí (\fB\-f\fR) změnu. Příkaz lze spustit jako běžný uživatel.
-.SH "SOUBORY"
-.TP
-\fI/etc/passwd\fR
-informace o uživatelských účtech
-.TP
-\fI/etc/shadow\fR
-důvěrné informace o uživatelských účtech
-.SH "VIZ TAKÉ"
-.PP
-\fBpasswd\fR(5),
-\fBshadow\fR(5).
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- SPDX-FileCopyrightText: 1990 - 1994, Julianne Frances Haugh
- SPDX-FileCopyrightText: 1999 , Ben Collins
- SPDX-FileCopyrightText: 2007 - 2011, Nicolas François
- SPDX-License-Identifier: BSD-3-Clause
--->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!--ENTITY CONSOLE_GROUPS SYSTEM "login.defs.d/CONSOLE_GROUPS.xml"-->
-<!-- A call to CONSOLE_GROUPS is linked, but not used -->
-<!-- SHADOW-CONFIG-HERE -->
-]>
-
-<refentry id='expiry.1'>
- <!-- $Id$ -->
- <refentryinfo>
- <author>
- <firstname>Julianne Frances</firstname>
- <surname>Haugh</surname>
- <contrib>Creation, 1990</contrib>
- </author>
- <author>
- <firstname>Thomas</firstname>
- <surname>Kłoczko</surname>
- <email>kloczek@pld.org.pl</email>
- <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
- </author>
- <author>
- <firstname>Nicolas</firstname>
- <surname>François</surname>
- <email>nicolas.francois@centraliens.net</email>
- <contrib>shadow-utils maintainer, 2007 - now</contrib>
- </author>
- </refentryinfo>
- <refmeta>
- <refentrytitle>expiry</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
- <refmiscinfo class="source">shadow-utils</refmiscinfo>
- <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
- </refmeta>
- <refnamediv id='name'>
- <refname>expiry</refname>
- <refpurpose>check and enforce password expiration policy</refpurpose>
- </refnamediv>
- <!-- body begins here -->
- <refsynopsisdiv id='synopsis'>
- <cmdsynopsis>
- <command>expiry</command>
- <arg choice='plain'>
- <replaceable>option</replaceable>
- </arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id='description'>
- <title>DESCRIPTION</title>
- <para>
- The <command>expiry</command> command checks (<option>-c</option>)
- the current password expiration and forces (<option>-f</option>)
- changes when required. It is callable as a normal user command.
- </para>
- </refsect1>
-
- <refsect1 id='options'>
- <title>OPTIONS</title>
- <para>
- The options which apply to the <command>expiry</command> command are:
- </para>
- <variablelist remap='IP'>
- <varlistentry>
- <term><option>-c</option>, <option>--check</option></term>
- <listitem>
- <para>Check the password expiration of the current user.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-f</option>, <option>--force</option></term>
- <listitem>
- <para>
- Force a password change if the current user has an expired
- password.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><option>-h</option>, <option>--help</option></term>
- <listitem>
- <para>Display help message and exit.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id='files'>
- <title>FILES</title>
- <variablelist>
- <varlistentry>
- <term><filename>/etc/passwd</filename></term>
- <listitem>
- <para>User account information.</para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><filename>/etc/shadow</filename></term>
- <listitem>
- <para>Secure user account information.</para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1 id='see_also'>
- <title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>,
- <citerefentry>
- <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
- </citerefentry>.
- </para>
- </refsect1>
-</refentry>
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
man1/chfn.1 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man1/gpasswd.1 \
+++ /dev/null
-.\" SPDX-FileCopyrightText: 1990 - 1994 Julianne Frances Haugh
-.\" SPDX-FileCopyrightText: 1997 Kazuyoshi Furutaka
-.\" SPDX-License-Identifier: BSD-3-Clause
-.\"
-.\" Modified for expiry by Ben Collins <bcollins@debian.org>, 1999
-.\" Translated Sun 3 Mar 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\" Modified Tue 16 Sep 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
-.\"
-.\" $Id$
-.\"
-.TH EXPIRY 1
-.SH 名前
-expiry \- パスワードの期限切れポリシーのチェックと執行
-.SH 書式
-.TP 6
-\fBexpiry\fR [\fB\-c\fR] [\fB\-f\fR]
-.SH 説明
-.B expiry
-は現在のパスワード期限切れ情報をチェック (\fB\-c\fR) し、
-必要な場合は変更を強制する (\fB\-f\fR)。
-このコマンドは通常のユーザコマンドとして呼び出し可能である。
-.SH ファイル
-\fI/etc/passwd\fR \- ユーザアカウント情報
-.br
-\fI/etc/shadow\fR \- shadow 化されたユーザアカウント情報
-.SH 関連項目
-.BR passwd (5),
-.BR shadow (5)
-.SH 著者
-Ben Collins <bcollins@debian.org>
</para>
</listitem>
</varlistentry>
- <!-- expiry: no variables (CONSOLE_GROUPS linked, but not used) -->
<!-- faillog: no variables -->
<varlistentry>
<term>gpasswd</term>
man_MANS = \
man1/chage.1 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
$(top_srcdir)/man/chgpasswd.8.xml \
$(top_srcdir)/man/chpasswd.8.xml \
$(top_srcdir)/man/chsh.1.xml \
- $(top_srcdir)/man/expiry.1.xml \
$(top_srcdir)/man/faillog.5.xml \
$(top_srcdir)/man/faillog.8.xml \
$(top_srcdir)/man/gpasswd.1.xml \
#: chfn.1.xml.out:18
#: chpasswd.8.xml.out:21
#: chsh.1.xml.out:18
-#: expiry.1.xml.out:19
#: faillog.5.xml.out:15
#: faillog.8.xml.out:15
#: groupadd.8.xml.out:18
#: chfn.1.xml.out:19
#: chpasswd.8.xml.out:22
#: chsh.1.xml.out:19
-#: expiry.1.xml.out:20
#: faillog.5.xml.out:16
#: faillog.8.xml.out:16
#: groupadd.8.xml.out:19
#: chage.1.xml.out:18
#: chfn.1.xml.out:20
#: chsh.1.xml.out:20
-#: expiry.1.xml.out:21
msgid "Creation, 1990"
msgstr ""
#: chgpasswd.8.xml.out:22
#: chpasswd.8.xml.out:26
#: chsh.1.xml.out:23
-#: expiry.1.xml.out:24
#: faillog.5.xml.out:20
#: faillog.8.xml.out:20
#: gpasswd.1.xml.out:27
#: chgpasswd.8.xml.out:23
#: chpasswd.8.xml.out:27
#: chsh.1.xml.out:24
-#: expiry.1.xml.out:25
#: faillog.5.xml.out:21
#: faillog.8.xml.out:21
#: gpasswd.1.xml.out:28
#: chgpasswd.8.xml.out:24
#: chpasswd.8.xml.out:28
#: chsh.1.xml.out:25
-#: expiry.1.xml.out:26
#: faillog.5.xml.out:22
#: faillog.8.xml.out:22
#: gpasswd.1.xml.out:29
#: chfn.1.xml.out:26
#: chpasswd.8.xml.out:29
#: chsh.1.xml.out:26
-#: expiry.1.xml.out:27
#: faillog.5.xml.out:23
#: faillog.8.xml.out:23
#: gpasswd.1.xml.out:30
#: chgpasswd.8.xml.out:28
#: chpasswd.8.xml.out:32
#: chsh.1.xml.out:29
-#: expiry.1.xml.out:30
#: faillog.5.xml.out:26
#: faillog.8.xml.out:26
#: gpasswd.1.xml.out:33
#: chgpasswd.8.xml.out:29
#: chpasswd.8.xml.out:33
#: chsh.1.xml.out:30
-#: expiry.1.xml.out:31
#: faillog.5.xml.out:27
#: faillog.8.xml.out:27
#: gpasswd.1.xml.out:34
#: chgpasswd.8.xml.out:30
#: chpasswd.8.xml.out:34
#: chsh.1.xml.out:31
-#: expiry.1.xml.out:32
#: faillog.5.xml.out:28
#: faillog.8.xml.out:28
#: gpasswd.1.xml.out:35
#: chgpasswd.8.xml.out:31
#: chpasswd.8.xml.out:35
#: chsh.1.xml.out:32
-#: expiry.1.xml.out:33
#: faillog.5.xml.out:29
#: faillog.8.xml.out:29
#: gpasswd.1.xml.out:36
#: chpasswd.8.xml.out:307
#: chsh.1.xml.out:37
#: chsh.1.xml.out:212
-#: expiry.1.xml.out:38
#: faillog.8.xml.out:235
#: gpasswd.1.xml.out:41
#: gpasswd.1.xml.out:95
#: chage.1.xml.out:36
#: chfn.1.xml.out:38
#: chsh.1.xml.out:38
-#: expiry.1.xml.out:39
#: gpasswd.1.xml.out:42
#: groups.1.xml.out:35
#: login.1.xml.out:68
#: chgpasswd.8.xml.out:38
#: chpasswd.8.xml.out:42
#: chsh.1.xml.out:39
-#: expiry.1.xml.out:40
#: faillog.5.xml.out:36
#: faillog.8.xml.out:36
#: gpasswd.1.xml.out:43
#: chgpasswd.8.xml.out:39
#: chpasswd.8.xml.out:43
#: chsh.1.xml.out:40
-#: expiry.1.xml.out:41
#: faillog.5.xml.out:37
#: faillog.8.xml.out:37
#: gpasswd.1.xml.out:44
#: chgpasswd.8.xml.out:56
#: chpasswd.8.xml.out:60
#: chsh.1.xml.out:60
-#: expiry.1.xml.out:58
#: faillog.5.xml.out:45
#: faillog.8.xml.out:54
#: gpasswd.1.xml.out:72
#: chgpasswd.8.xml.out:83
#: chpasswd.8.xml.out:108
#: chsh.1.xml.out:71
-#: expiry.1.xml.out:67
#: faillog.8.xml.out:65
#: gpasswd.1.xml.out:112
#: groupadd.8.xml.out:51
#: chgpasswd.8.xml.out:84
#: chpasswd.8.xml.out:109
#: chsh.1.xml.out:72
-#: expiry.1.xml.out:68
#: faillog.8.xml.out:66
#: gpasswd.1.xml.out:120
#: groupadd.8.xml.out:81
#: chgpasswd.8.xml.out:113
#: chpasswd.8.xml.out:153
#: chsh.1.xml.out:77
-#: expiry.1.xml.out:88
#: faillog.8.xml.out:98
#: gpasswd.1.xml.out:151
#: groupadd.8.xml.out:118
#: chgpasswd.8.xml.out:113
#: chpasswd.8.xml.out:153
#: chsh.1.xml.out:77
-#: expiry.1.xml.out:88
#: faillog.8.xml.out:98
#: gpasswd.1.xml.out:151
#: groupadd.8.xml.out:118
#: chpasswd.8.xml.out:153
#: chpasswd.8.xml.out:161
#: chsh.1.xml.out:77
-#: expiry.1.xml.out:73
-#: expiry.1.xml.out:79
-#: expiry.1.xml.out:88
#: faillog.8.xml.out:72
#: faillog.8.xml.out:98
#: faillog.8.xml.out:144
#: chgpasswd.8.xml.out:115
#: chpasswd.8.xml.out:155
#: chsh.1.xml.out:79
-#: expiry.1.xml.out:90
#: faillog.8.xml.out:100
#: gpasswd.1.xml.out:153
#: groupadd.8.xml.out:120
#: chgpasswd.8.xml.out:218
#: chpasswd.8.xml.out:274
#: chsh.1.xml.out:163
-#: expiry.1.xml.out:97
#: faillog.5.xml.out:72
#: faillog.8.xml.out:220
#: gpasswd.1.xml.out:258
#: chfn.1.xml.out:193
#: chpasswd.8.xml.out:277
#: chsh.1.xml.out:166
-#: expiry.1.xml.out:100
#: groupmod.8.xml.out:245
#: grpck.8.xml.out:223
#: lastlog.8.xml.out:63
#: chfn.1.xml.out:195
#: chpasswd.8.xml.out:279
#: chsh.1.xml.out:168
-#: expiry.1.xml.out:102
#: groupmod.8.xml.out:247
#: grpck.8.xml.out:225
#: login.1.xml.out:331
#. (itstool) path: para/filename
#: chage.1.xml.out:288
#: chpasswd.8.xml.out:283
-#: expiry.1.xml.out:106
#: login.1.xml.out:335
#: newgrp.1.xml.out:68
#: newgrp.1.xml.out:106
#. (itstool) path: listitem/para
#: chage.1.xml.out:291
#: chpasswd.8.xml.out:285
-#: expiry.1.xml.out:108
#: login.1.xml.out:337
#: newgrp.1.xml.out:108
#: newusers.8.xml.out:428
#: chgpasswd.8.xml.out:242
#: chpasswd.8.xml.out:304
#: chsh.1.xml.out:209
-#: expiry.1.xml.out:115
#: faillog.5.xml.out:84
#: faillog.8.xml.out:232
#: gpasswd.1.xml.out:276
#: chfn.1.xml.out:211
#: chpasswd.8.xml.out:307
#: chsh.1.xml.out:218
-#: expiry.1.xml.out:118
#: groupadd.8.xml.out:351
#: groupdel.8.xml.out:211
#: groupmems.8.xml.out:215
#: chpasswd.8.xml.out:314
#: chsh.1.xml.out:215
#: chsh.1.xml.out:218
-#: expiry.1.xml.out:118
-#: expiry.1.xml.out:121
#: faillog.5.xml.out:34
#: faillog.8.xml.out:238
#: gpasswd.1.xml.out:294
#. (itstool) path: refnamediv/refname
#. (itstool) path: para/filename
#: chage.1.xml.out:337
-#: expiry.1.xml.out:121
#: grpck.8.xml.out:51
#: grpck.8.xml.out:190
#: grpck.8.xml.out:297
#. (itstool) path: refsect1/para
#: chage.1.xml.out:332
-#: expiry.1.xml.out:116
#: faillog.8.xml.out:233
#: nologin.8.xml.out:58
#: shadow.3.xml.out:215
#. (itstool) path: para/option
#. (itstool) path: cmdsynopsis/arg
#: chfn.1.xml.out:94
-#: expiry.1.xml.out:61
-#: expiry.1.xml.out:79
#: groupadd.8.xml.out:88
#: groupdel.8.xml.out:72
#: login.1.xml.out:90
#: chpasswd.8.xml.out:86
#: chpasswd.8.xml.out:116
#: chpasswd.8.xml.out:135
-#: expiry.1.xml.out:60
-#: expiry.1.xml.out:73
#: newusers.8.xml.out:270
#: sg.1.xml.out:50
#: su.1.xml.out:86
msgid "Directory for additional user defined configuration files."
msgstr ""
-#. (itstool) path: refmeta/refentrytitle
-#. (itstool) path: refnamediv/refname
-#. (itstool) path: cmdsynopsis/command
-#. (itstool) path: para/command
-#: expiry.1.xml.out:37
-#: expiry.1.xml.out:44
-#: expiry.1.xml.out:50
-#: expiry.1.xml.out:60
-#: expiry.1.xml.out:69
-msgid "expiry"
-msgstr ""
-
-#. (itstool) path: refnamediv/refpurpose
-#: expiry.1.xml.out:45
-msgid "check and enforce password expiration policy"
-msgstr ""
-
#. (itstool) path: arg/replaceable
-#: expiry.1.xml.out:52
#: gpasswd.1.xml.out:63
msgid "option"
msgstr ""
-#. (itstool) path: refsect1/para
-#: expiry.1.xml.out:59
-msgid "The <_:command-1/> command checks (<_:option-2/>) the current password expiration and forces (<_:option-3/>) changes when required. It is callable as a normal user command."
-msgstr ""
-
-#. (itstool) path: term/option
-#: expiry.1.xml.out:73
-msgid "--check"
-msgstr ""
-
-#. (itstool) path: listitem/para
-#: expiry.1.xml.out:75
-msgid "Check the password expiration of the current user."
-msgstr ""
-
#. (itstool) path: term/option
-#: expiry.1.xml.out:79
#: groupadd.8.xml.out:88
#: groupdel.8.xml.out:72
#: userdel.8.xml.out:76
msgid "--force"
msgstr ""
-#. (itstool) path: listitem/para
-#: expiry.1.xml.out:81
-msgid "Force a password change if the current user has an expired password."
-msgstr ""
-
#. (itstool) path: author/contrib
#: faillog.5.xml.out:17
#: faillog.8.xml.out:17
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
man_MANS = \
man1/chage.1 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
man8/chgpasswd.8 \
man8/chpasswd.8 \
man1/chsh.1 \
- man1/expiry.1 \
man5/faillog.5 \
man8/faillog.8 \
man3/getspnam.3 \
src/chgpasswd.c
src/chpasswd.c
src/chsh.c
-src/expiry.c
src/faillog.c
src/gpasswd.c
src/groupadd.c
/chgpasswd
/chpasswd
/chsh
-/expiry
/faillog
/gpasswd
/groupadd
bin_PROGRAMS = login
sbin_PROGRAMS = nologin
-ubin_PROGRAMS = faillog chage chfn chsh expiry gpasswd newgrp passwd
+ubin_PROGRAMS = faillog chage chfn chsh gpasswd newgrp passwd
if ENABLE_SUBIDS
ubin_PROGRAMS += newgidmap newuidmap
endif
suidusbins =
suidbins =
-suidubins = chage chfn chsh expiry gpasswd newgrp
+suidubins = chage chfn chsh gpasswd newgrp
if WITH_SU
suidbins += su
endif
chgpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD) $(LIBECONF)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF) -ldl
-expiry_LDADD = $(LDADD) $(LIBECONF)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF)
groupadd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) -ldl
groupdel_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) -ldl
+++ /dev/null
-/*
- * SPDX-FileCopyrightText: 1994 , Julianne Frances Haugh
- * SPDX-FileCopyrightText: 1996 - 2000, Marek Michałkiewicz
- * SPDX-FileCopyrightText: 2001 - 2006, Tomasz Kłoczko
- * SPDX-FileCopyrightText: 2007 - 2011, Nicolas François
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#include "config.h"
-
-#ident "$Id$"
-
-#include <pwd.h>
-#include <signal.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <getopt.h>
-
-#include "attr.h"
-#include "defines.h"
-#include "prototypes.h"
-/*@-exitarg@*/
-#include "exitcodes.h"
-#include "shadowlog.h"
-
-/* Global variables */
-static const char Prog[] = "expiry";
-static bool cflg = false;
-
-/* local function prototypes */
-static void catch_signals(int);
-NORETURN static void usage (int status);
-static void process_flags (int argc, char **argv);
-
-/*
- * catch_signals - signal catcher
- */
-static void
-catch_signals(int)
-{
- _exit (10);
-}
-
-/*
- * usage - print syntax message and exit
- */
-NORETURN
-static void
-usage (int status)
-{
- FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
- (void) fprintf (usageout,
- _("Usage: %s [options]\n"
- "\n"
- "Options:\n"),
- Prog);
- (void) fputs (_(" -c, --check check the user's password expiration\n"), usageout);
- (void) fputs (_(" -f, --force force password change if the user's password\n"
- " is expired\n"), usageout);
- (void) fputs (_(" -h, --help display this help message and exit\n"), usageout);
- (void) fputs ("\n", usageout);
- exit (status);
-}
-
-/*
- * process_flags - parse the command line options
- *
- * It will not return if an error is encountered.
- */
-static void process_flags (int argc, char **argv)
-{
- bool fflg = false;
- int c;
- static struct option long_options[] = {
- {"check", no_argument, NULL, 'c'},
- {"force", no_argument, NULL, 'f'},
- {"help", no_argument, NULL, 'h'},
- {NULL, 0, NULL, '\0'}
- };
-
- while ((c = getopt_long (argc, argv, "cfh",
- long_options, NULL)) != -1) {
- switch (c) {
- case 'c':
- cflg = true;
- break;
- case 'f':
- fflg = true;
- break;
- case 'h':
- usage (E_SUCCESS);
- /*@notreached@*/break;
- default:
- usage (E_USAGE);
- }
- }
-
- if (! (cflg || fflg)) {
- usage (E_USAGE);
- }
-
- if (cflg && fflg) {
- fprintf (stderr,
- _("%s: options %s and %s conflict\n"),
- Prog, "-c", "-f");
- usage (E_USAGE);
- }
-
- if (argc != optind) {
- fprintf (stderr,
- _("%s: unexpected argument: %s\n"),
- Prog, argv[optind]);
- usage (E_USAGE);
- }
-}
-
-/*
- * expiry - check and enforce password expiration policy
- *
- * expiry checks (-c) the current password expiration and forces (-f)
- * changes when required. It is callable as a normal user command.
- */
-int main (int argc, char **argv)
-{
- struct passwd *pwd;
- struct spwd *spwd;
-
- sanitize_env ();
- check_fds ();
-
- log_set_progname(Prog);
- log_set_logfd(stderr);
-
- /*
- * Start by disabling all of the keyboard signals.
- */
- (void) signal (SIGHUP, catch_signals);
- (void) signal (SIGINT, catch_signals);
- (void) signal (SIGQUIT, catch_signals);
- (void) signal (SIGTSTP, catch_signals);
-
- /*
- * expiry takes one of two arguments. The default action is to give
- * the usage message.
- */
- (void) setlocale (LC_ALL, "");
- (void) bindtextdomain (PACKAGE, LOCALEDIR);
- (void) textdomain (PACKAGE);
-
- OPENLOG (Prog);
-
- process_flags (argc, argv);
-
- /*
- * Get user entries for /etc/passwd and /etc/shadow
- */
- pwd = get_my_pwent ();
- if (NULL == pwd) {
- fprintf (stderr, _("%s: Cannot determine your user name.\n"),
- Prog);
- SYSLOG ((LOG_WARN, "Cannot determine the user name of the caller (UID %lu)",
- (unsigned long) getuid ()));
- exit (10);
- }
- spwd = getspnam (pwd->pw_name); /* !USE_PAM, No need for xgetspnam */
-
- /*
- * If checking accounts, use agecheck() function.
- */
- if (cflg) {
- /*
- * Print out number of days until expiration.
- */
- agecheck (spwd);
-
- /*
- * Exit with status indicating state of account.
- */
- exit (isexpired (pwd, spwd));
- }
-
- /*
- * Otherwise, force a password change with the expire() function.
- * It will force the change or give a message indicating what to
- * do.
- * It won't return unless the account is unexpired.
- */
- (void) expire (pwd, spwd);
-
- return E_SUCCESS;
-}
-
/usr/bin/chage
/usr/bin/chfn
/usr/bin/chsh
-/usr/bin/expiry
/usr/bin/gpasswd
/usr/bin/passwd
/usr/sbin
/usr/share/man
/usr/share/man/cs
/usr/share/man/cs/man1
-/usr/share/man/cs/man1/expiry.1.gz
/usr/share/man/cs/man1/gpasswd.1.gz
/usr/share/man/cs/man5
/usr/share/man/cs/man5/gshadow.5.gz
/usr/share/man/de/man1/chage.1.gz
/usr/share/man/de/man1/chfn.1.gz
/usr/share/man/de/man1/chsh.1.gz
-/usr/share/man/de/man1/expiry.1.gz
/usr/share/man/de/man1/gpasswd.1.gz
/usr/share/man/de/man1/passwd.1.gz
/usr/share/man/de/man5
/usr/share/man/fr/man1/chage.1.gz
/usr/share/man/fr/man1/chfn.1.gz
/usr/share/man/fr/man1/chsh.1.gz
-/usr/share/man/fr/man1/expiry.1.gz
/usr/share/man/fr/man1/gpasswd.1.gz
/usr/share/man/fr/man1/passwd.1.gz
/usr/share/man/fr/man5
/usr/share/man/it/man1/chage.1.gz
/usr/share/man/it/man1/chfn.1.gz
/usr/share/man/it/man1/chsh.1.gz
-/usr/share/man/it/man1/expiry.1.gz
/usr/share/man/it/man1/gpasswd.1.gz
/usr/share/man/it/man1/passwd.1.gz
/usr/share/man/it/man5
/usr/share/man/ja/man1/chage.1.gz
/usr/share/man/ja/man1/chfn.1.gz
/usr/share/man/ja/man1/chsh.1.gz
-/usr/share/man/ja/man1/expiry.1.gz
/usr/share/man/ja/man1/gpasswd.1.gz
/usr/share/man/ja/man1/passwd.1.gz
/usr/share/man/ja/man5
/usr/share/man/man1/chage.1.gz
/usr/share/man/man1/chfn.1.gz
/usr/share/man/man1/chsh.1.gz
-/usr/share/man/man1/expiry.1.gz
/usr/share/man/man1/gpasswd.1.gz
/usr/share/man/man1/passwd.1.gz
/usr/share/man/man5
/usr/share/man/pl/man1
/usr/share/man/pl/man1/chage.1.gz
/usr/share/man/pl/man1/chsh.1.gz
-/usr/share/man/pl/man1/expiry.1.gz
/usr/share/man/pl/man8
/usr/share/man/pl/man8/groupadd.8.gz
/usr/share/man/pl/man8/groupdel.8.gz
/usr/share/man/ru/man1/chage.1.gz
/usr/share/man/ru/man1/chfn.1.gz
/usr/share/man/ru/man1/chsh.1.gz
-/usr/share/man/ru/man1/expiry.1.gz
/usr/share/man/ru/man1/gpasswd.1.gz
/usr/share/man/ru/man1/passwd.1.gz
/usr/share/man/ru/man5
/usr/share/man/sv/man1
/usr/share/man/sv/man1/chage.1.gz
/usr/share/man/sv/man1/chsh.1.gz
-/usr/share/man/sv/man1/expiry.1.gz
/usr/share/man/sv/man1/passwd.1.gz
/usr/share/man/sv/man5
/usr/share/man/sv/man5/gshadow.5.gz
/usr/share/man/zh_CN/man1/chage.1.gz
/usr/share/man/zh_CN/man1/chfn.1.gz
/usr/share/man/zh_CN/man1/chsh.1.gz
-/usr/share/man/zh_CN/man1/expiry.1.gz
/usr/share/man/zh_CN/man1/gpasswd.1.gz
/usr/share/man/zh_CN/man1/passwd.1.gz
/usr/share/man/zh_CN/man5
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "0"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "1"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-#
-# /etc/pam.d/common-password - password-related modules common to all services
-#
-# This file is included from other service-specific PAM config files,
-# and should contain a list of modules that define the services to be
-# used to change user passwords. The default is pam_unix.
-
-# Explanation of pam_unix options:
-#
-# The "sha512" option enables salted SHA512 passwords. Without this option,
-# the default is Unix crypt. Prior releases used the option "md5".
-#
-# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
-# login.defs.
-#
-# See the pam_unix manpage for other options.
-
-# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
-# To take advantage of this, it is recommended that you configure any
-# local modules either before or after the default block, and use
-# pam-auth-update to manage selection of other modules. See
-# pam-auth-update(8) for details.
-
-# here are the per-package modules (the "Primary" block)
-password [success=1 default=ignore] pam_unix.so obscure sha512
-# here's the fallback if no module succeeds
-password requisite pam_deny.so
-# prime the stack with a positive return value if there isn't one already;
-# this avoids us returning an error just because nothing sets a success code
-# since the modules above will each just jump around
-password required pam_permit.so
-# and here are more per-package modules (the "Additional" block)
-# end of pam-auth-update config
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-root:@PASS_SHA512 password@:@TODAY@:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -f\r"
-expect "Your password has expired. Choose a new password."
-expect "Enter new UNIX password: "
-send "password\r"
-expect "Retype new UNIX password: "
-send "password\r"
-expect "passwd: password updated successfully"
-expect "# "
-send "echo \$?\r"
-expect "0"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl data/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-Usage: expiry [options]
-
-Options:
- -c, --check check the user's password expiration
- -f, --force force password change if the user's password
- is expired
- -h, --help display this help message and exit
-
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry provides an Usage message if no options are given"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Call expiry without any option (expiry)..."
-expiry 2>tmp/usage.out && exit 1 || {
- status=$?
-}
-echo "OK"
-
-echo -n "Check returned status ($status)..."
-test "$status" = "2"
-echo "OK"
-
-echo "expiry reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "0"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Remove /etc/shadow..."
-rm -f /etc/shadow
-echo "OK"
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check that there are no shadow files..."
-test ! -f /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "0"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7::13000:
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "3"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:10:7:10::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "2"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:9000:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts stderr "\nFAIL"; exit 1}
-
-spawn /bin/sh
-send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r"
-expect "# "
-
-send "expiry -c\r"
-expect "# "
-send "echo \$?\r"
-expect "0"
-expect "# "
-send "exit\r"
-puts "OK\n"
-exit 0
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-log_start "$0" "expiry can verify that a password is not expired"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-./expiry.exp
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-expiry: invalid option -- 'Z'
-Usage: expiry [options]
-
-Options:
- -c, --check check the user's password expiration
- -f, --force force password change if the user's password
- is expired
- -h, --help display this help message and exit
-
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-log_start "$0" "expiry provides an Usage message if an invalid option is given"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Call expiry with an invalid option (expiry -Z)..."
-expiry -Z 2>tmp/usage.out && exit 1 || {
- status=$?
-}
-echo "OK"
-
-echo -n "Check returned status ($status)..."
-test "$status" = "2"
-echo "OK"
-
-echo "expiry reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-Usage: expiry [options]
-
-Options:
- -c, --check check the user's password expiration
- -f, --force force password change if the user's password
- is expired
- -h, --help display this help message and exit
-
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-log_start "$0" "expiry can display its usage message"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Get expiry usage message (expiry --help)..."
-expiry --help >tmp/usage.out
-echo "OK"
-
-echo "expiry reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-expiry: unexpected argument: foo
-Usage: expiry [options]
-
-Options:
- -c, --check check the user's password expiration
- -f, --force force password change if the user's password
- is expired
- -h, --help display this help message and exit
-
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-log_start "$0" "expiry check that no argument remain onthecommand line"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Call expiry with an extra argument (expiry -f foo)..."
-expiry -f foo 2>tmp/usage.out && exit 1 || {
- status=$?
-}
-echo "OK"
-
-echo -n "Check returned status ($status)..."
-test "$status" = "2"
-echo "OK"
-
-echo "expiry reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
+++ /dev/null
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-foo:x
+++ /dev/null
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-foo:*::
+++ /dev/null
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-foo:x:1000:1000:::/bin/false
+++ /dev/null
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:1:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-foo:!:12977:0:99999:7:::
+++ /dev/null
-expiry: options -c and -f conflict
-Usage: expiry [options]
-
-Options:
- -c, --check check the user's password expiration
- -f, --force force password change if the user's password
- is expired
- -h, --help display this help message and exit
-
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-log_start "$0" "expiry check that the -c and -f flags are not used at the same time"
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-echo -n "Call expiry with the -c and -f flags (expiry -f -c)..."
-expiry -f -c 2>tmp/usage.out && exit 1 || {
- status=$?
-}
-echo "OK"
-
-echo -n "Check returned status ($status)..."
-test "$status" = "2"
-echo "OK"
-
-echo "expiry reported:"
-echo "======================================================================="
-cat tmp/usage.out
-echo "======================================================================="
-echo -n "Check the usage message..."
-diff -au data/usage.out tmp/usage.out
-echo "usage message OK."
-rm -f tmp/usage.out
-
-echo -n "Check the passwd file..."
-../../common/compare_file.pl config/etc/passwd /etc/passwd
-echo "OK"
-echo -n "Check the group file..."
-../../common/compare_file.pl config/etc/group /etc/group
-echo "OK"
-echo -n "Check the shadow file..."
-../../common/compare_file.pl config/etc/shadow /etc/shadow
-echo "OK"
-echo -n "Check the gshadow file..."
-../../common/compare_file.pl config/etc/gshadow /etc/gshadow
-echo "OK"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-
run_test ./failures/usermod/17_usermod_-v_rename_subuid_failure/usermod.test
run_test ./failures/usermod/18_usermod_-w_rename_subgid_failure/usermod.test
fi
-run_test ./expiry/01_expiry_-c_no_expiry/expiry.test
-run_test ./expiry/02_expiry_-c_expired/expiry.test
-run_test ./expiry/03_expiry_-f_expired/expiry.test
-run_test ./expiry/04_expiry_no_options/expiry.test
-run_test ./expiry/05_expiry_-c_no_shadow_file/expiry.test
-run_test ./expiry/06_expiry_-c_no_shadow_entry/expiry.test
-run_test ./expiry/07_expiry_-c_expired_account/expiry.test
-run_test ./expiry/08_expiry_-c_expired_max+inact/expiry.test
-run_test ./expiry/09_expiry_-c_expired_not_inactive/expiry.test
-run_test ./expiry/10_expiry_bad_option/expiry.test
-run_test ./expiry/11_expiry_usage/expiry.test
-run_test ./expiry/12_expiry_extra_arg/expiry.test
-run_test ./expiry/13_expiry_usage-c-f/expiry.test
run_test ./passwd/01_passwd_-S_root_locked_account/passwd.test
run_test ./passwd/02_passwd_-S_root_valid_account/passwd.test
run_test ./passwd/03_passwd_-S_root_empty_password/passwd.test
run_test ./failures/usermod/17_usermod_-v_rename_subuid_failure/usermod.test
run_test ./failures/usermod/18_usermod_-w_rename_subgid_failure/usermod.test
fi
-run_test ./expiry/01_expiry_-c_no_expiry/expiry.test
-run_test ./expiry/02_expiry_-c_expired/expiry.test
-run_test ./expiry/03_expiry_-f_expired/expiry.test
-run_test ./expiry/04_expiry_no_options/expiry.test
-run_test ./expiry/05_expiry_-c_no_shadow_file/expiry.test
-run_test ./expiry/06_expiry_-c_no_shadow_entry/expiry.test
-run_test ./expiry/07_expiry_-c_expired_account/expiry.test
-run_test ./expiry/08_expiry_-c_expired_max+inact/expiry.test
-run_test ./expiry/09_expiry_-c_expired_not_inactive/expiry.test
-run_test ./expiry/10_expiry_bad_option/expiry.test
-run_test ./expiry/11_expiry_usage/expiry.test
-run_test ./expiry/12_expiry_extra_arg/expiry.test
-run_test ./expiry/13_expiry_usage-c-f/expiry.test
run_test ./passwd/01_passwd_-S_root_locked_account/passwd.test
run_test ./passwd/02_passwd_-S_root_valid_account/passwd.test
run_test ./passwd/03_passwd_-S_root_empty_password/passwd.test