You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
470 B
19 lines
470 B
12 months ago
|
#!/bin/bash
|
||
|
# Author: Iain Douglas <centos@1n6.org.uk>
|
||
|
|
||
|
t_Log "Running $0 - Testing newusers"
|
||
|
|
||
|
if [ "$CONTAINERTEST" -eq "1" ]; then
|
||
|
t_Log "Running in container -> SKIP"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
grep -q "^xyssy" /etc/passwd && { t_Log "FAIL: user xyssy alredy exists"; exit $FAIL; }
|
||
|
newusers <<EOF
|
||
|
xyssy:plughcycle:990991:990991:xyssy comment:/home/xyssy:/bin/bash
|
||
|
EOF
|
||
|
t_CheckExitStatus $?
|
||
|
echo "Check password file updated"
|
||
|
grep -q "^xyssy" /etc/passwd
|
||
|
t_CheckExitStatus $?
|