Blame tests/p_shadow-utils/14-newusers_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 - Testing newusers"
40b4c8
40b4c8
if [ "$CONTAINERTEST" -eq "1" ]; then
40b4c8
    t_Log "Running in container -> SKIP"
40b4c8
    exit 0
40b4c8
fi
40b4c8
Athmane Madjoudj 536354
grep -q "^xyssy" /etc/passwd && { t_Log "FAIL: user xyssy alredy exists"; exit $FAIL; }
Athmane Madjoudj 536354
newusers <
Athmane Madjoudj 536354
xyssy:plughcycle:990991:990991:xyssy comment:/home/xyssy:/bin/bash
Athmane Madjoudj 536354
EOF
Athmane Madjoudj 536354
t_CheckExitStatus $?
Athmane Madjoudj 536354
echo "Check password file updated"
Athmane Madjoudj 536354
grep -q "^xyssy" /etc/passwd 
Athmane Madjoudj 536354
t_CheckExitStatus $?