bstinson / centos / t_functional

Forked from centos/t_functional 4 years ago
Clone

Blame tests/p_shadow-utils/20-chage_tests

Athmane Madjoudj 536354
#!/bin/bash
Athmane Madjoudj 536354
# Author: Iain Douglas <centos@1n6.org.uk>
Athmane Madjoudj 536354
Christoph Galuschka 06c925
t_Log "Running $0"
Athmane Madjoudj 536354
Athmane Madjoudj 536354
userdel -rf testshadow; useradd testshadow
Athmane Madjoudj 536354
echo "testshadow" | passwd --stdin testshadow
Athmane Madjoudj 536354
Athmane Madjoudj 536354
echo "Set last date passwd changed to 2013-01-01"
Athmane Madjoudj 536354
chage -d 2013-01-01 testshadow
Athmane Madjoudj 536354
t_CheckExitStatus $?
Athmane Madjoudj 536354
Athmane Madjoudj 536354
echo "Check that last passwd change is reported correctly"
Athmane Madjoudj 536354
chage -l testshadow | grep Last | grep -q "Jan 01, 2013"
Athmane Madjoudj 536354
t_CheckExitStatus $?